I am trying to use:
gets( userInput ); or
fgets( userInput, 21, stdin );
to get a string from the keyboard. Instead of stopping, it blows by the statement leaving a NULL string in its wake! The only thing I can think is that I used scanf earlier in the program. Any troubleshooting...
Hi,
In the following code, as far as I can tell, I get identical strings, but strcmp does not return 0.
{
int controlLoop = 0, charLoop = 0, index = -1;
char stateSelect[STATESIZE] = { '\0' };
for ( controlLoop = 0; controlLoop < STATES; controlLoop++ )
{
if ( controlLoop % 3 == 0 )...
Hi,
Can anyone tell me what type "pointer_t" is? I could not find it in the MSDN library, but I'm not sure I know what I'm looking for. I was asked to develop a project and given a list of variables and their types.
Thanks,
David
Hi all,
My prog is crashing on the following statement:
while ( strcmp( abbrev[loop].initials, product ) != 0 && loop < size )
I get a "illegal" error from windows and the program dies.
char * initials
char product[75]
loop goes from 0 to size (around 150 lines)
I'm thinking...
Hi,
I'm having problems passing a string array, modifying it, and getting it back into main. Here are the sections of code that I think are relavent:
Function Prototype:
int fillArray(char *[], int);
Array declaration:
char *zipFileNames[ARRAYSIZELIMIT];
Function call...
Hi,
I am working with zipfiles to get familiar with C. I've written a program that uses fread to process each local header file, then use fseek to skip to the next local header file. My goal is to print out the filenames of each file in the zipfile.
Unfortunately, after processing multiple...
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.