I need to request a service from a server. I have written the program for both. The client sends a text request and the server tokenizez(sp??) the string into 3 tokens. I need to use the tokens now in a switch statement (or suggest some other way, want to avoid if/else)
The problem is that I...
FILE cfPtr;
FileData[100][256];
int rows = 0;
if ((cfPtr = fopen("a:\file.txt", "r")) == NULL)
puts("ERROR");
while (!feof(cfPtr))
{
fgets(FileData[rows], 256, cfPtr);
rows++;
}
plus more code but this should get the data into the array
FILE cfPtr;
FileData[100][256];
int rows = 0;
if ((cfPtr = fopen("a:\file.txt", "r")) == NULL)
puts("ERROR");
while (!feof(cfPtr))
{
fgets(FileData[rows], 256, cfPtr);
rows++;
}
plus more code but this should get the data into the array
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.