I've got 2 char arrays as follows:
password[80];
message[80];
I want to write them to a file ONE AT A TIME. First the password onto the 1st line of the file. Then the message onto the...
Type: Posts; User: cpluspluser
I've got 2 char arrays as follows:
password[80];
message[80];
I want to write them to a file ONE AT A TIME. First the password onto the 1st line of the file. Then the message onto the...
I know I'm using getline(), but I can't seem to use it for 2 lines. I can get the first line no prob
e.g. infile.getline(variable, 80, '\n')
But how do I use getline() to get the second...
Hi, all:
I have the following 2 lines in a file:
password
Another sample line.
I want to first read in the first line (i.e. password) and write it to a file. Then I want to go back and...
Hi, all!
I'm writing an encryption program where I want to encrypt 2 lines that are being read in from a file. First I want to encrypt the 1st line and write the encrypted version to a second...
The "combination" is defined as char combination[6]. When newCombination is called, I want the parameter c string (combo) to be set to the combination variable, if the entire combo string is...
If I've got the C String:
char c_string[15];
Can I refer to it later as:
c_string
or does it need to be c_string[]
As much as I've read on this one issue, it still confuses the heck out of me.
If I've got a C String as follows:
char testString[6];
Can this be initialized as follows:
testString =...
Good Evening!
Having some trouble getting the folowing program to function properly. It compiles perfectly, but does not seem to be functioning. Essentially, the code is supposed to create a...
Here's a simple function that's supposed to write to a file (random access file), but it doesn't seem to work. Any ideas why?
Thanks!!
void addRecord(fstream& file)
{
InventoryItem...