Posts by danieltm64 • 269 points
6 posts
- 
		2 votes1 answer150 viewsA: Is it possible to determine the hardware address of the router?The solution I’m going to show you here only works if: The program arp is installed on the machine running your program. The format of the output arp is always the same (I believe it is). Basically,… 
- 
		5 votes2 answers1802 viewsA: Difference between char array and char pointerWhen you declare an array of char thus: char name[256]; the program allocates 256 characters in the main memory. When you declare a pointer of char thus: char *apelido; the program allocates enough… 
- 
		3 votes2 answers142 viewsA: Function print with errorChange this: void fibonacci(int x, int y, std::vector<int> fi, int numeroElementos); therefore: void fibonacci(int x, int y, std::vector<int>& fi, int numeroElementos); And make the… 
- 
		1 votes1 answer272 viewsA: Segmentation failure during image to grayscale conversionYou are trying to allocate 250,000 pixels (500 * 500) into the stack (which is 3 MB if each int occupies 4 bytes), and then you pass this huge array to other functions. I believe this blows the… 
- 
		0 votes2 answers324 viewsA: How to declare a component of a static struct in the function? CWhen you define a structure like this: struct ponto { int x; int y; } You can declare a variable of this type: struct ponto variavel; Then you can access the numbers x and y thus: variavel.x = 10;… 
- 
		2 votes2 answers295 viewsA: Problem with mallocint verPal(int num1, int *v) // no main: y = verPal(numero,v); The function verPal receives a copy of the pointer v provided by main and assigns to that local copy the address returned by malloc,…