Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. PowerNuke

    stdin waits for no gets or fgets

    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...
  2. PowerNuke

    Problem with strcmp

    Never Mind folks! My stupid error. If you'll notice, I reference the wrong loop control variable in the last loop. :/ Oh well.
  3. PowerNuke

    Problem with strcmp

    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 )...
  4. PowerNuke

    type pointer_t

    Hi, Can anyone tell me what type &quot;pointer_t&quot; 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
  5. PowerNuke

    char *, char[ ], and changing conditions.

    Hi all, My prog is crashing on the following statement: while ( strcmp( abbrev[loop].initials, product ) != 0 && loop < size ) I get a &quot;illegal&quot; error from windows and the program dies. char * initials char product[75] loop goes from 0 to size (around 150 lines) I'm thinking...
  6. PowerNuke

    PASSING AN ARRAY OF POINTERS

    Brudnakm, Thanks for all your help! It is really appreciated. I am teaching myself C, and although I'm enjoying it, I find C to be very unforgiving. It's a lot harder than 10 statement fortran, but then, I don't have to keypunch or wait overnight for my run printout. lol I had not even...
  7. PowerNuke

    PASSING AN ARRAY OF POINTERS

    Hi guys, Thanks for the info. That was clearly a problem. However, one prob still remains. I said that the array was filling properly, but it is not. The function statements are in a while loop. Each loop, the fileName is different, and as you can see, the file number increments, starting...
  8. PowerNuke

    PASSING AN ARRAY OF POINTERS

    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...
  9. PowerNuke

    Zip Files - End of File before the true EOF.

    You are so right! I've been fighting that for a week. :( Thanks for your help.
  10. PowerNuke

    Zip Files - End of File before the true EOF.

    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...

Part and Inventory Search

Back
Top