- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 0
- Posts with Upvotes
- 0
- Upvoting Members
- 0
- Downvotes Received
- 6
- Posts with Downvotes
- 3
- Downvoting Members
- 5
Re:
I'm very new to C++, my midterm is requiring me to read from a txt file I created line by line. Each line has different subject code that requires some calculations. My understanding was that you open your file and read in the first line in the file, thats the … |
|
Re:
Does anyone know of a good way to sort an stl map? I have something like the following example: [code] #include <iostream> #include <map> #include <algorithm> int main() { map<int, float> map_to_sort; // Populate the map with between 20 - 2000 elements map_to_sort.sort(); } [/code] Obviously I am aware that … |
|
Re:
at the moment i have 2 answers to queations and the answers are 1,2,3 or 4 but i ow have to make it so the user has to put a work in like "Brazil" but i try to do the same as if the user puts "A" in and it … |
|
Re:
hi, can anyone help me with my code, any help will be much appreciated. The design should follow object oriented principles and use the UML tools. It should be a board game based on a “Monopoly-style” board made of 36 squares. The game is for two players who first enter … |
|
I hope, this is not a compiler issue. See the below code [CODE]#include <iostream> #include <string> using namespace std; string data,name; void getTst() { cout<<"Enter Name :"; getline(cin,name); cout<<"\nENter data :"; getline(cin,data); } void dispTst() { cout<<"\nName :"<<name; cout<<"\n Data :"<<data; } int main() { int tmp; cin>>tmp; getTst(); dispTst(); … |
|
Hi, plz find my small solution. [CODE][COLOR="Green"] #include <iostream> #include <ctime> #include <string> using namespace std; class cPlayer { public: [COLOR="red"] string Pl_name;[/COLOR] int pos; int pts; }; cPlayer p1, p2; int random(int nMin, int nMax) { return rand() % (nMax - nMin + 1) + nMin; } int main() … |