Questions tagged as 'c'

1
answer

how to copy files in c

How do I copy files in c? I would like to copy the file "gg.bat" to "% AppData% \ Roaming \ Microsoft \ Windows \ Start Menu \ Programs \ Startup" as I do this using the language and tried with so it appears: The syntax of the fil...
asked by 06.04.2016 / 03:25
1
answer

Problem with array editing outside main ()

So, guys, I'm in extreme doubt with the code below. I started to study pointers in C a few days ago and I believe it is the solution to my problem, but I do not know how to handle the code. The problem is as follows. In the multiplyMatters ()...
asked by 07.03.2016 / 07:12
1
answer

Problems to calculate the largest int prime in C

Hello. I'm trying to calculate the largest prime number that fits into an int variable. My idea was to start with the biggest int, and go check in descending order until you find the first prime number. When I try to run the program I get the...
asked by 28.02.2016 / 14:11
0
answers

Compile error in Visual Studio

I'm very new to Visual Studio, I'm trying to compile a server and it returns me thousands of errors that look like this: 1>int_guild.obj : error LNK2019: unresolved external symbol _strtoi64 referenced in function inter_guild_exp_parse_row...
asked by 19.03.2016 / 13:31
2
answers

How to remove a structure element

I'm having trouble removing an element from the list. Here is the code: #include<stdio.h>// colocar no esquininho do AVA ate amanha #include<stdlib.h> #define max 5 typedef struct info { int numero; struct info* prox; }List...
asked by 06.04.2016 / 20:08
3
answers

Largest array number, does not display

This code does not show how the largest element in the array should be positioned correctly. What is the error? #include <stdio.h> #include <stdlib.h> #define lin 4 #define col 4 int main() { int mat[lin][col], i, j, maior=mat[0...
asked by 04.03.2016 / 20:36
1
answer

Checksum ip packet

Galera would like to understand the last 4 lines, why do all these bitswise? Code complete . Follow the code: static int in_cksum(u_short *addr, int len) { register int nleft = len; register u_short *w = addr; register int sum...
asked by 01.02.2016 / 22:48
1
answer

Receive character in C

How do I make a function in C that is equal to the function Readkey of Pascal or equal to function Lastkey of old Clipper ? I want to receive only one character for each key pressed. Create menus, receive ESC...
asked by 13.01.2016 / 21:12
1
answer

Error with sort order with dynamic allocation

I'm doing a C program in dynamic allocation and I'm having some questions at the sorting part. I did the code, and it even runs, but when I type the option ordena the screen just blinks, and does not perform the process ... What am I d...
asked by 16.11.2015 / 15:28
1
answer

Doubt about pointers and return of functions

Hello everyone. I would like to know why the function below would need a pointer to the pointer, in this case a **root , so that the line / 1 / could modify the *root , while the line / 2 / can modify it without having to resort to i...
asked by 26.12.2015 / 23:47