Search:

Type: Posts; User: sphynxter

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    2
    Views
    2,994

    What makes you so certain that a C forum would be...

    What makes you so certain that a C forum would be the most effective place to ask a PHP question? Be that as it may, the good news is it may actually be a good place to state your problem! Since you...
  2. Replies
    10
    Views
    1,931

    If you are on linux, why not simply see if...

    If you are on linux, why not simply see if /dev/dvd exists?
  3. Replies
    5
    Views
    13,815

    That is a common issue with scanf(). It basically...

    That is a common issue with scanf(). It basically takes control of your input buffer, so if you mix it with other functions fun stuff occurs. Can you give a code sample? Or maybe its easiest to say...
  4. Replies
    10
    Views
    3,401

    for(x = 0;x

    for(x = 0;x<3;++x)
    for(y = 0; y<3; ++y)
    square[x][y] = random();


    To fix your initial problem--assuming you use my random.

    I also just noticed a boo-boo with my while loop....
  5. Replies
    10
    Views
    3,401

    Here is how I would do it.... int...

    Here is how I would do it....



    int random(void)
    {
    static short used = 0;
    int r;

    while(used & (1 << (r = (rand() % 9))))
  6. Replies
    10
    Views
    3,401

    Its not even a magic square anyway... is this the...

    Its not even a magic square anyway... is this the whole program?

    Ooops I see your random() function.
  7. Replies
    5
    Views
    1,671

    Just for the sake of personal curiosity, did your...

    Just for the sake of personal curiosity, did your compiler issue any sort of warning when you had return; in your code?
  8. To put it in over-simplified terms: since C does...

    To put it in over-simplified terms: since C does not support inheritence, this is the closest thing you can do to achieving that result.
  9. Replies
    6
    Views
    1,712

    ....

    ....
  10. Replies
    10
    Views
    17,090

    Would it be possible to post your code you are...

    Would it be possible to post your code you are using to open the COM port for reading? Perhaps you are making a mistake at that point in your program. Also, how does ReadByte() work?
  11. The way I would recommend doing it, just reading...

    The way I would recommend doing it, just reading over it is to do the sum of the whole array, see if that is divisible by two (!(grand_total & 0x1) or !(grand_total % 2) or whatever). Then work from...
  12. Replies
    13
    Views
    15,943

    I would like to specify that you should not use...

    I would like to specify that you should not use precompiled headers in a production version of your software. Overall, however, if you are using CVS or something similar precompiled headers muck up...
  13. Replies
    10
    Views
    1,356

    With all due respect to Elysia, perhaps if you...

    With all due respect to Elysia, perhaps if you describe your help as not very useful without a deeper understanding of a moderately advanced subject in C++ programming, perhaps it is unwise advice to...
  14. Replies
    4
    Views
    1,761

    /*CALENDAR PROJECT*/ /* including header files ...

    /*CALENDAR PROJECT*/
    /* including header files */
    #include<graphics.h>
    #include<conio.h>
    int main()
    {
    int a[20],b=0,l=28;
    char c;
    int loop=0;
    calloop :
  15. Replies
    3
    Views
    1,843

    You are probably going to hate me for saying...

    You are probably going to hate me for saying this, but the easiest way I am seeing to do this task would be to write a keyboard hook that interprets keyboard events only when your console has focus. ...
  16. Thread: Macro magic

    by sphynxter
    Replies
    10
    Views
    2,628

    Typically one would be printing debug info to...

    Typically one would be printing debug info to std::cerr, but I suppose this is just adding on to brewbuck's previous statement.
  17. Replies
    10
    Views
    7,484

    Or to make CodeMonkey's even nicer looking... ...

    Or to make CodeMonkey's even nicer looking...



    switch (leapyear)
    {
    case 0:
    {
    switch (month)
    {
  18. Replies
    3
    Views
    1,843

    You are on the right track now, DAaaMan64. You...

    You are on the right track now, DAaaMan64. You are correct in assuming you need to be messing with some platform specific API to accomplish this task. It is platform specific. Which if you think...
  19. Thread: Macro magic

    by sphynxter
    Replies
    10
    Views
    2,628

    The reason the computer science guys may say its...

    The reason the computer science guys may say its evil is that because in C++ you always have the option of creating inline functions.




    #ifndef NDEBUG
    template<typename T>
    void...
  20. Replies
    52
    Views
    26,041

    Very true, some mallocs keep a full table of...

    Very true, some mallocs keep a full table of handles internally though. So its reasonable to say that with a keen enough understanding of the internal data structures used you could theoretically...
  21. Replies
    31
    Views
    18,850

    Poll: Nurses can't seem to resist programmers. Or thus...

    Nurses can't seem to resist programmers. Or thus has been my experience. That or I have a thing for nurses. I am undecided. Another good reason to take up programming is because its a tool in which...
  22. Dear friend, Your code looks excellent thus...

    Dear friend,

    Your code looks excellent thus far, have you yet studied iostreams? Perhaps this would be a good time to use cin.
  23. Replies
    3
    Views
    1,729

    Some password crackers try similar types of...

    Some password crackers try similar types of brute-force permutations in order to force their way in. Would you be trying to accomplish such a feat? I would imagine depending on what you are doing...
  24. Replies
    31
    Views
    18,850

    Poll: Don't get a CS lady silly. You use your cunning...

    Don't get a CS lady silly. You use your cunning to get someone into something completely non-related.
  25. Replies
    4
    Views
    4,487

    If I am being a doofus here, just tell me if I am...

    If I am being a doofus here, just tell me if I am on the wrong track. But shouldn't it be something like this?

    gcc currency_app.c currency.c -o app
Results 1 to 25 of 30
Page 1 of 2 1 2