Search:

Type: Posts; User: acidblue

Search: Search took 0.01 seconds.

  1. Replies
    6
    Views
    7,801

    Thanks AndrewHunter your example works. Strange...

    Thanks AndrewHunter your example works.
    Strange though all I changed was this:

    struct tm* tm = localtime(&now);

    tm->tm_mday += numDays;
    mktime(tm);


    To this:
  2. Replies
    6
    Views
    7,801

    I've tried: cout

    I've tried:

    cout << mktime(tm);
    But that gives the same results
  3. Replies
    6
    Views
    7,801

    Adding #days to a date

    So far I have this bit of code for adding number of days to a date using the time.h module:

    int main(int argc, char **argv)
    {
    int numDays;
    printf ("Enter number of days to add ");
    scanf...
  4. Replies
    4
    Views
    5,366

    Thanks, that's so much easier.

    Thanks, that's so much easier.
  5. Replies
    4
    Views
    5,366

    Truncate an array?

    Unbuntu 10.04 Geany IDE

    I have a sort of a unique problem.
    I want to write to a text file using user input with a char array.
    But if the user doesn't write the exact number of characters for the...
  6. Thanks, Funny after taking one more look at my...

    Thanks,
    Funny after taking one more look at my code I saw the semi colon in the if statement.
    I came to edit my post and saw your responses.

    That appears to have worked, code runs fine now....
  7. I don't understand why this isn't working

    This is driving me nuts.
    I am following this tutorial: C Strings - C++ Tutorial - Cprogramming.com

    Program compiled fine it just doesn't do what it should.
    It won't give the correct number of...
  8. Replies
    12
    Views
    4,370

    Damn! that was easy. What about copying...

    Damn! that was easy.
    What about copying different file types.

    system("copy \"c:\\Documents and Settings\\%USERNAME%\\My Documents\\*.txt\" "\\*.jpg\ c\\"
  9. Replies
    12
    Views
    4,370

    I new I had it wrong, just needed some one like...

    I new I had it wrong, just needed some one like you to show me the light :)
    That totally works now.

    Now on to the second part of my quest.
    What if I don't know the user name, is there some way...
  10. Replies
    12
    Views
    4,370

    Not sure what you're saying quzah, the path is in...

    Not sure what you're saying quzah, the path is in quotes.

    system("copy \ "c:\\Documents and Settings\\rocko\\My Documents\\*.txt c:\\"");
  11. Replies
    12
    Views
    4,370

    Yes, I put the code into my program and ran it....

    Yes, I put the code into my program and ran it.
    That part of the program runs fine, returns list of 5 txt files.
  12. Replies
    12
    Views
    4,370

    system("dir "c:\\Documents and...

    system("dir \"c:\\Documents and Settings\\my_user_name\\My Documents\\*.txt\"");


    Funny, that works, I have 5 txt files in that folder.
    But I still get the "file not located" error when it tries...
  13. Replies
    12
    Views
    4,370

    Trying to copy txt files with system()

    Hi There!
    I'm trying to copy all the txt files in a directory and move to another directory.
    But I keep getting "System cannot locate file" error.
    Here is my code:

    #include <stdio.h>
    #include...
  14. Replies
    5
    Views
    957

    Why thank you. Yeah I spotted that after taking...

    Why thank you.
    Yeah I spotted that after taking a second, a third and even a fourth look.
  15. Replies
    5
    Views
    957

    Yes it sure would. I totally forgot the scanf()...

    Yes it sure would.
    I totally forgot the scanf() function.
    Thanks.

    Now if i could could figure out why I'm getting a segmentation fault that would br great.
    Time to break out KDbg.
  16. Replies
    5
    Views
    957

    Fuction not executing switch/case

    The switch/case part of the function doesn't execute.

    Is this because the function returns no value/has no parameters?
    Tried adding the 'userResponse' variable as a parameter but that
    didn't...
  17. Replies
    5
    Views
    1,885

    Thanks.. I got it working correctly now.

    Thanks..
    I got it working correctly now.
  18. Replies
    5
    Views
    1,885

    oh damn I don't believe I overlooked that,...

    oh damn I don't believe I overlooked that, thanks.

    But after re-compiling it still doesn't iterate to the next bit of code .
  19. Replies
    5
    Views
    1,885

    For Loop won't iterate to next bit of code.

    Another simple one that's got me stumped.

    This compiles fine with out error's but when I run it, it never get's
    passed the "How many questions would you like?" .

    When I input a number it...
  20. DOH! I new it was something simple. thanks.

    DOH!

    I new it was something simple.
    thanks.
  21. Simple dice game ..or boolean operator not working right

    I'm making a simple roll the dice game that displays your the winner if you roll a 7 or 11.
    But my 'OR' operator doesn't seem to be working.
    It always displays your the winner regardless the roll...
  22. Replies
    3
    Views
    1,511

    AHA! I knew it. Complete noob mistakes. Thanks...

    AHA! I knew it.
    Complete noob mistakes.
    Thanks for the help guys.
    Everything is cool now.
  23. Replies
    3
    Views
    1,511

    true division in C ?

    Hi there!
    This is my first post and I'm a complete noob to C, so
    please bare with me.
    I'm having an awful time trying to do true division.
    All my variables are int type but my result comes out...
Results 1 to 23 of 24