oh. crap. alright, thank you.
Type: Posts; User: WinterInChicago
oh. crap. alright, thank you.
the int j= i?
im doing something wrong, because i tried changing it to
for (int j = i; j >0; j--)
and it made it worse... im not sure i understand.
what does that mean?
getting there...
my output is just looking odd... new code:
#include<iostream>
#include<iomanip>
#include<vector>
#include<fstream>
#include<string>
I think this is right.... but i have errors:
aname9.cpp: In function `int main()':
aname9.cpp:43: warning: assignment to `int' from `double'
aname9.cpp:43: warning: argument to `int'...
alright, i did some more coding and changed the for loop to a while loop:
to store in the vectors and array:
int i=0;
while (!fileout.eof())
{
fileout >> ssn[i];
fileout.ignore(80,'\n');
so how do i list them in reverse... does it involve another for loop with an i-- in it
i would assume to put the end of file check at the end of the for loop. is that wrong? and im not sure how i store them in the arrays or vectors, or list them. im lost.
this so far compiles
//Name
//Program 9
//Write a program that reads info from a dat file and stores it in vectors and arrays.
#include<iostream>
#include<vector>
so am i doing getline(fileout, name[i]);
if i use getline, will it still be taking it from the file?
so far
#include<iomanip>
#include<vector>
#include<fstream>
#include<string>
int main ()
better?
#include<iomanip>
#include<vector>
#include<ifstream>
#include<string>
int main ()
Am I on the right track. I know there is not much to my code, but am I?
assignment--------
CSCI 1010 Programming Assignment 9
Write a C++ program that reads the following information...
ohhh. i .... disregard what was here, i see now
thanks so much for hte help
i knew that... i dont know why i didnt catch it, thanks... but nowmy files arent writing correctly. the 50plus and 50below should be written like:
A10
B10
B30
C20
C30
but its writing the...
#include <iostream>
#include <fstream>
#include <string>
using namespace std;
void outputfile (ofstream & filesout, string serial);
//function declaration
int main ()
better?
#include <iostream>
#include <fstream>
using namespace std;
void outputfile (ofstream & filesout, string serial);
//function declaration
So I need an int to pass the info in the file to, to pass to the void, to put in the if else to know which file to write what to? Is this correct?
This is why I came here. I do not know what to put.
what?
fileout is my stream
I am trying to understand this assignment. Im reading my book and the lecture notes the prof. puts online but I am stuck. Could you help me please?
assignment:
CSCI 1010 Programming Assignment...
i wish i could edit my first post. i think one of my classmates snatched my code off here and i dont want that.