- Upvotes Received
- 0
- Posts with Upvotes
- 0
- Upvoting Members
- 0
- Downvotes Received
- 1
- Posts with Downvotes
- 1
- Downvoting Members
- 1
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? |
|
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 … |
|
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 … |
|
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[], … |
|
#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 = … |
|
#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; … |