Posts
 
Reputation
Joined
Last Seen
Strength to Increase Rep
+0
Strength to Decrease Rep
-0
0% Quality Score
Upvotes Received
0
Posts with Upvotes
0
Upvoting Members
0
Downvotes Received
6
Posts with Downvotes
3
Downvoting Members
5
2 Commented Posts
0 Endorsements
~4K People Reached
Favorite Forums
Favorite Tags
c++ x 10
Member Avatar for 3cats

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 …

Member Avatar for 3cats
0
170
Member Avatar for liliafan

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 …

Member Avatar for Narue
1
305
Member Avatar for smitysmit

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 …

Member Avatar for Robert1995
0
146
Member Avatar for angel19

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 …

Member Avatar for mn.balakumar
0
3K
Member Avatar for mn.balakumar

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(); …

Member Avatar for NathanOliver
0
82
Member Avatar for mn.balakumar

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() …

Member Avatar for mn.balakumar
-2
94