Search:

Type: Posts; User: Dunners

Search: Search took 0.01 seconds.

  1. Replies
    4
    Views
    933

    I've tried using getch() but the problem I have...

    I've tried using getch() but the problem I have is that it requires enter to be pressed, I want to grab a character and move on as soon as the user presses that character key, no hanging round if you...
  2. Replies
    4
    Views
    933

    getting input from buffer

    Hey all,

    is it possible to use cin to grab a character from the buffer without the user having to press enter, etc? i.e. as soon as the key is pressed the character goes into the variable used...
  3. Replies
    4
    Views
    1,419

    Sorry I have the endif in the actual file, I...

    Sorry I have the endif in the actual file, I would copy and paste them direclty but there's about 1000 lines of code which is why I really want to split them. For some reason I'm getting the same...
  4. Replies
    4
    Views
    1,419

    This one seems to have me well and truly whipped....

    This one seems to have me well and truly whipped. It keeps complaining that I'm redefining the functions but I can't figure out why. If you can shed anymore light on this it would be appreciated....
  5. Replies
    4
    Views
    1,419

    Splitting up class definitions

    Hello All!

    I am attempting to split up a class into two files, a .h and a .cpp but I'm getting so many errors that it's mad. Basically I have in my header file:




    #if !defined MY_CLASSES_H...
  6. Replies
    2
    Views
    1,049

    Cheers boss! At last it's all working, I'm so...

    Cheers boss! At last it's all working, I'm so happy I think I'll cry myself to sleep!
  7. Replies
    2
    Views
    1,049

    Passing Structures

    I'm sorry guys, I swear this will be my last post of the day :)

    How would I return a structure from function a to function b so that I can acces the data members of the structure in function b?
    ...
  8. Thread: Cin Masking

    by Dunners
    Replies
    8
    Views
    1,648

    cheers, I'll give that a try. I think the...

    cheers, I'll give that a try. I think the compiler I have has getch() so everything should be grand. About 30 more minutes work and I should be able to get some kip, 17 hours programming (with a...
  9. Thread: Cin Masking

    by Dunners
    Replies
    8
    Views
    1,648

    The basic thing is the user has to enter a...

    The basic thing is the user has to enter a "passcode" of 4 numbers which are stored in an integer when the user presses enter. I want a * to appear on screen when they press the numbers rather then...
  10. Thread: Cin Masking

    by Dunners
    Replies
    8
    Views
    1,648

    Cin Masking

    Hi

    Is it possible to mask input gained using cin so that when a user type a different character (e.g. *) is displayed rather than the character they typed?

    Cheers
  11. Thread: end of file

    by Dunners
    Replies
    6
    Views
    1,371

    Oh now that is a pain in the rear. So to remove a...

    Oh now that is a pain in the rear. So to remove a single record from the file I'll have to copy all the records into the program one at a time, writing them into a new file before copying the next...
  12. Thread: end of file

    by Dunners
    Replies
    6
    Views
    1,371

    Cheers! Got that working now :) I know I'm...

    Cheers! Got that working now :)

    I know I'm being a pain but is it possible to delete a specific line from a file or append a section of that line? My program basically reads in information from a...
  13. Thread: end of file

    by Dunners
    Replies
    6
    Views
    1,371

    end of file

    Hi

    I'm having trouble with breaking from a loop when I reach the end of a line. Basically the program moves through each line, loads it into memory and checks a variable to see if it matches one...
  14. Replies
    1
    Views
    1,408

    Adding items to the beginning of a file

    Hi,

    Is it possible to add items to the beginning of an existing file without overwriting the data that already exists in the file? I have tried using ios::app but that only seems to let me append...
  15. Replies
    4
    Views
    1,250

    Hi, Basically what I'm doing is outputting...

    Hi,

    Basically what I'm doing is outputting several variables to a file and then read them back into those variables at a later stage. This can be done several times with each set of variables...
  16. Thread: File names

    by Dunners
    Replies
    2
    Views
    988

    that's working now, Cheers!

    that's working now, Cheers!
  17. Thread: File names

    by Dunners
    Replies
    2
    Views
    988

    File names

    Hi,

    I'm trying to dynamically specify a filename to be equal to something the user specifies at an earlier point in the system. The code I have is...



    ofstream out;
    out.open(file,...
  18. Replies
    4
    Views
    1,250

    input from files

    Hi guys,

    Is it possible to jump from one line to another in a file when using the getline() command to read data in without having to pad out the lines so that they are all the same length and...
  19. Replies
    9
    Views
    6,010

    I'm supposed to be using C++ but that chunk of...

    I'm supposed to be using C++ but that chunk of code was a bit of an edit of some older C code I had, I'll tidy it up before I put it in my project. Knowing my teacher if I don't there will be hell to...
  20. Replies
    9
    Views
    6,010

    Hi, I had a fiddle myself and managed to come...

    Hi,

    I had a fiddle myself and managed to come up with this.



    #include <stdio.h>
    #include <conio.h>
    #include <stdlib.h>
  21. Replies
    9
    Views
    6,010

    That doesn't seem to work. The program just hangs...

    That doesn't seem to work. The program just hangs on the getch() until the user inputs a value. I need it to break out as soon as the user enters a value or after a set period of time even if the...
  22. Replies
    9
    Views
    6,010

    Cheers, I think that might be what I'm looking...

    Cheers, I think that might be what I'm looking for, I'll let you know how it goes. Thanks again
  23. Replies
    9
    Views
    6,010

    Timeouts on Input

    Hi,

    I was just wondering is it possible to put a timeout on input in a C++ program (i.e. the user has a set time to enter a value before the program moves on). If this is possible where would I...
Results 1 to 23 of 23