Search:

Type: Posts; User: brightmatter

Search: Search took 0.01 seconds.

  1. parameter names (without types) in function declaration

    I have a bit of simple code here that seems to work fine in my program BUT, I get this warning and I cannot find the solution anywhere. So I turn to the forums. Inside this *.h file on a Fedora...
  2. Replies
    4
    Views
    30,296

    Windows 7 "access denied" for gcc

    I am using Cygwin on my windows 7 machine. I open a 'cmd' with administer privileges and type: gcc -Wall -m32 main.c
    I get "access denied".

    I have checked my environment variables and the...
  3. Replies
    10
    Views
    18,340

    So my options are to corrupt(truncates) the data...

    So my options are to corrupt(truncates) the data or to have an overflow?? That just seems wrong somehow. Nothing against you, but more against the idea of a hard coded limit like that. Honestly,...
  4. Replies
    10
    Views
    18,340

    So what you are saying is it is not possible to...

    So what you are saying is it is not possible to have this useful little gem while running on windows. Is this why Windows has so many buffer overflows? Isn't there any way to use scanf safely? By...
  5. Replies
    10
    Views
    18,340

    scanf "%as" (dynamic char arrays)

    I have tried many things to get this function to work on multiple Windows OSs (XP, Vista, Windows 7). It works fine in Linux. I have updated my compilers to the latest versions. I have tried MinGW...
  6. It was my impression that sizeof didn't lie so...

    It was my impression that sizeof didn't lie so much as it just includes the null terminator at the end of a C-style char array
  7. duly noted about card arrays. Are you sure...

    duly noted about card arrays.

    Are you sure that strlen() does not require any non-standard libraries?
  8. Well, I had tried this... char ca[] = {'E',...

    Well, I had tried this...

    char ca[] = {'E', 'n', 't', 'e', 'r', ' ', 'a', 'n', ' ', 'i', 'n', 'd', 'e', 'x', ':', ' ', '\n'};
    for(i = 0; i < sizeof(ca); i++) {
    putchar(ca[i]);
    }
    ...and as...
  9. yep. Well, not anymore because I am using the...

    yep.

    Well, not anymore because I am using the command you gave me. :)
  10. Issue solved: To avoid this thread going down...

    Issue solved:

    To avoid this thread going down a road that might be more practice than solution, I suppose I had better just post the working code and say we are good. Apparently Windows XP is not...
  11. setvbuf(stdout,NULL,_IONBF,0); works GREAT! Much...

    setvbuf(stdout,NULL,_IONBF,0); works GREAT! Much easier and applies to every printf I do. Thanks.
  12. I did the below... seems to work but you are...

    I did the below... seems to work but you are right that it will not do printf stuff. I will read the link to see if I can come up with something.


    void print_string(char print_this[]) {
    char...
  13. Ok, I tried this (likely ignorant) approach. The...

    Ok, I tried this (likely ignorant) approach. The problem is that I am seeing now is that when it passes the char[] "Enter an index: " it only really gives the function 32-bits worth (i.e. four...
  14. One disadvantage of learning a higher language...

    One disadvantage of learning a higher language first (like Java) is that you tend to assume every language will guide you, inform you, protect you and generally coddle you. I get in to C and it does...
  15. yes, printf works but it will not appear until...

    yes, printf works but it will not appear until after the main has returned... no printf or putchar will show anything in console until end of program. I also tried this:


    char ca[] = {'E', 'n',...
  16. printf waits until main returns to display

    I am using the most up-to-date eclipse IDE for C/C++. I have the below code. It seems simple enough. My problem is that no printf will display on the console until the main has finished (return...
Results 1 to 16 of 16