Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
0% Quality Score
Upvotes Received
0
Posts with Upvotes
0
Upvoting Members
0
Downvotes Received
1
Posts with Downvotes
1
Downvoting Members
1
~748 People Reached
Favorite Forums
Favorite Tags
c++ x 8
Member Avatar for chode1

11/29/2010 S 2907 1 11/29/2010 S 9673 4 11/30/2010 A 4321 30 11/31/2010 S 9673 12 12/01/2010 N 5789 wind_chimes 13.54 17.83 12/02/2010 S 5140 5 I have string date, char type and int id, processNumber. myfile>>date>>type>>id>>processNumber; does not work..what should i do?

Member Avatar for Clinton Portis
0
77
Member Avatar for chode1

this is my infile's data..How do I get info into various data types? extraction operator? I know extraction works but the 5th line throws me for a loop..Thanks for help; 11/29/2010 S 2907 1 11/29/2010 S 9673 4 11/30/2010 A 4321 30 11/31/2010 S 9673 12 12/01/2010 N 5789 wind_chimes …

Member Avatar for chiwawa10
0
95
Member Avatar for chode1

the file looks like: 11/29/2010 S 2907 1 11/29/2010 S 9673 4 11/30/2010 A 4321 30 11/31/2010 S 9673 12 12/01/2010 N 5789 wind_chimes 13.54 17.83 12/02/2010 S 5140 5 How can I extract out "2907" from file using >>? i think its myfile >> then something. #include <iomanip> #include …

Member Avatar for daviddoria
0
208
Member Avatar for chode1

its says that lastfile is undeclared #include <iomanip> #include <iostream> #include <fstream> #include <string> using namespace std; //void displayData(ofstream &, item_info[], int, int &); struct item_format { string ID; string item_name; int current_stock; int ordered_stock; float retail_price; float selling_price; }item_info[30], greeting_cards, note_cards, calendars, pens, candles, wind_chimes; void enterData(ifstream &, item_info[], …

Member Avatar for jonsca
0
140
Member Avatar for chode1

#include <sstream> #include <iomanip> #include <iostream> #include <fstream> #include <string> using namespace std; struct format { string ID; string item_name; int current_stock; int ordered_stock; float retail_price; float selling_price; } greeting_cards, note_cards, calendars, pens, candles, wind_chimes; int main () { string line; string data[6]; int datacounter = 0; string substr = …

Member Avatar for chode1
0
79
Member Avatar for chode1

#include <iostream> #include <fstream> #include <iomanip> #include <string> #include <ctime> using namespace std; void pickword (); int wordlength (); void printout (); void gameplay (); void totalgames (); void replay (); int main() { string guessed=""; string scaffold_top="______"; string scaffold_pole=" |"; string scaffold_bottom="_|_____"; string names[350]; ifstream infile; infile.open("smaller2.txt"); int counter; …

Member Avatar for SgtMe
0
149