Search:

Type: Posts; User: Gnoober

Page 1 of 2 1 2

Search: Search took 0.00 seconds.

  1. Replies
    8
    Views
    1,606

    Yes, this is a console app (i know what it is...

    Yes, this is a console app (i know what it is lol). I need to write to a text file that already has text in it. I need to insert something into the middle of it pretty much, but without writing over...
  2. Replies
    8
    Views
    1,606

    ios::out question

    I need to figure out a way to move the cursor in "ios:: out" mode without overwriting stuff. The problem is that I need to move by the line, not by the character. Is there any way to do this? Thanks...
  3. Replies
    0
    Views
    1,705

    Help on high scores

    I too am writing a text game but not really for the actual game so much as for the practice. Anyway, I'm trying to get a high score list up an going but I'm stuck... I can find where the new score...
  4. Replies
    4
    Views
    1,657

    I figured it out, if anyone was working on it....

    I figured it out, if anyone was working on it. The problem is that "i" is never reset back to 1 in the loop. Thanks for all the help guys!
  5. Replies
    3
    Views
    1,616

    Getch() may be what you want. You can just say...

    Getch() may be what you want. You can just say something like:

    char ch=getch();

    but I don't know about arrow keys. Maybe someone with more experience could help you out.
  6. Replies
    4
    Views
    1,657

    I'm doing the high scores by myself. If anyone...

    I'm doing the high scores by myself. If anyone has any tips on how to do high scores more efficiently, please help me out. Maybe a different format of the text file or something...
  7. Replies
    4
    Views
    1,657

    This function finds the lowest number and I run...

    This function finds the lowest number and I run it before I run putit().


    void lowestnumber(){

    int i=1;
    File.seekg(ios::beg);


    while(i<oflines-1){
  8. Replies
    4
    Views
    1,657

    Working on High Scores...

    I'm working on a function that seeks out where a high score should go in a text file. For some reason it loops until it gets to the highest number in the list. Here is the contents of "data.txt" and...
  9. Replies
    2
    Views
    1,142

    Geez, I feel like an idiot... Thanks Magos!

    Geez, I feel like an idiot... Thanks Magos!
  10. Replies
    2
    Views
    1,142

    File i/o... integers

    I need to know how to read a number in a text file as an integer, not a string. The number is on its own line which makes it easier I'm sure, but getline() takes a "char" as an argument. I have tried...
  11. Replies
    3
    Views
    829

    TempInLine is a char[256] and as far as I can...

    TempInLine is a char[256] and as far as I can tell, getline() is what I am using...
  12. Replies
    3
    Views
    829

    Small File i/o Problem

    For some reason the function below clears my entire file. I don't know if getline() clears what it gets or if something is wrong with my code. Either way, I need to figure out a way to count the...
  13. Thread: High Scores

    by Gnoober
    Replies
    2
    Views
    2,058

    High Scores

    I am really in a bind here trying to implement high scores into a console app. I just don't understand file reading and writing. The books I have don't cover it very well. Here's some psuedo code,...
  14. Replies
    8
    Views
    3,690

    To implement a string array, use pointers to char...

    To implement a string array, use pointers to char arrays.
    Example:



    char a[], b[];
    strcpy (a, "STRING1");
    strcpy (b, "STRING2");

    char * c[];
  15. Replies
    8
    Views
    3,690

    This could be a stupid question... but how do you...

    This could be a stupid question... but how do you know which line getline() is getting?
  16. Thread: resources

    by Gnoober
    Replies
    11
    Views
    1,573

    Never Mind, I got it to work. I made a stupid...

    Never Mind, I got it to work. I made a stupid mistake and didn't add the resource file to my project:rolleyes: . Thanks so much for all the help!
  17. Thread: resources

    by Gnoober
    Replies
    11
    Views
    1,573

    Ok... It isn't working:( here's my code: ...

    Ok... It isn't working:(

    here's my code:


    LoadIcon( GetModuleHandle( NULL ), MAKEINTRESOURCE( "icon.rc") );


    I have the resource file created and it compiles just fine but the icon...
  18. Thread: resources

    by Gnoober
    Replies
    11
    Views
    1,573

    So in the main, I should just type ...

    So in the main, I should just type

    LoadIcon(nameOfResource);

    It seems too easy:) Maybe I'm missing something
  19. Replies
    6
    Views
    18,671

    Correct me if I'm wrong because I am new to C++,...

    Correct me if I'm wrong because I am new to C++, but if you declare and integer type, any number assigned to the variable will automatically be truncated into an integer.
    Example:



    #include...
  20. Thread: resources

    by Gnoober
    Replies
    11
    Views
    1,573

    I'm not sure if I understand... Heres what I get...

    I'm not sure if I understand...
    Heres what I get out of that:

    I must create a WMDCLASSEX object and then use



    object.hIcon = LoadIcon();
  21. Replies
    7
    Views
    1,382

    Is that linux\unix specific?

    Is that linux\unix specific?
  22. Thread: resources

    by Gnoober
    Replies
    11
    Views
    1,573

    resources

    Does anyone know where I could find out how to link resources to my program (in windows). I can create the resource file but I'm not sure how to get it to link to my program. I have created an icon...
  23. Replies
    7
    Views
    966

    edit: I guess I answered his question about the...

    edit: I guess I answered his question about the same time Magos did... sorry;)
  24. Replies
    4
    Views
    5,315

    Clear the Console Screen

    I have forgotten where I found this... but it is a header file to use the clrscr() function in C++. Just save the file into you compiler's "include" folder and when you want to clear the screen type...
  25. Thread: Finishing up

    by Gnoober
    Replies
    2
    Views
    1,453

    I can create the resource but is there a command...

    I can create the resource but is there a command like

    #include <blahblah.rc>

    that I should use to link the resource to my app?
Results 1 to 25 of 40
Page 1 of 2 1 2