- Strength to Increase Rep
- +3
- Strength to Decrease Rep
- -0
- Upvotes Received
- 1
- Posts with Upvotes
- 1
- Upvoting Members
- 1
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
Hi, I am new to Java, but have been programming in C++ for a few years now. I am working on a project where I have to write a class to implement a gameboard. To do so, I'm using a 2D array of objects. I have a method that swaps … | |
Re: Put it in main and pass the ifstream value to the load_grid function [code=c++] string Input_File_Name; ifstream InFile; int number; cout << "Enter the name of the input file (ctrl-c to exit): "; cin >> Input_File_Name; InFile.open(Input_File_Name.c_str()); while(!InFile) // Tests the state of the ifstream { cout << "Input file … | |
Re: Have you atleast written some code and ATTEMPTED to write this program? If so, Post the code (use code tags) and ask a specific question about some code you are having problems with. Then myself or others would gladly HELP. If NOT... | |
Re: Someone else correct me if I'm wrong, but you just write in pseudo code (not completely syntactically correct) the basic algorithm. Not quite sure what you're asking about the array though | |
Re: Try something like this, I'm still new to C++, but learning. Hope this works. [code] int month; int date; int year; int someint; InFile >> month; InFile.ignore(500, '/'); InFile >> day; InFile.ignore(500,'/'); InFile >> year; InFile.ignore(500, '_'); InFile >> someint; //InFile is declared as the ifstream [/code] | |
Hey, I'm still fairly new to C++, and even more new to this forum. Any help would be greatly appreciated. Could someone look at this segment of code for me and tell me what is wrong with the "if" statements to change the time. I'm not getting the output that … |