Beginners - November 2013 (Page 29)

vector of pointers isn't outputting right help!
 
Here is my code: if (option == 1) { cout << "The current player list is:" << endl; for (int i = 0; i < AllPlayers.size(); i++) { cout << (*(AllPlayers )...
[no replies]
by JohnJH
binary division
 
How do i perform binary division, i want both the remainder and result of the division.. I am kinda confused on how I should to it..
[6 replies] Last: Well if you want the remainder, you'd want to use integers rather than... (by Disch)
by tatai
Sum of a column
 
I have a txt file with data of each day store in columns. number of the year is in first column. Now I need the total data of each year for each column data. my...
[2 replies] Last: I think we need to initialize 'v' at line 40. (by tatai)
Vector of pointers of objects
 
Basically I just don't understand how you can access the information of the object through the vector pointers. For example, I need a vector of pointers that po...
[2 replies] Last: Okay so I see how that works, the only thing is when I put the informa... (by drackblagon)
Help, getline bugging out when looped?
 
So I'm trying to get into the swing of things and I've been trying to make a form that asks for a persons name, age, gender, and then asks them to confirm it. I...
[2 replies] Last: Oh DX woops, thanks a ton! (by avatarait)
Errors to fix
 
My code has over 700 lines so I'll need to post it in chunks: Error 1: I've purposely put the wrong file name in my loadRates function so I could work on the...
[12 replies] Last: how about on line 13 instead of reading for 3000 times (magic number?)... (by giblit)
Magic Square program, please help!
 
Been working on this magic square problem for a while now and I'm stuck, I have no idea what to do next, I'm pretty new to c++ so any help would be great. thank...
[5 replies] Last: Yeah tell me about it, I'm an engineering major, and this is the only ... (by waketheford)
by JohnJH
binary operations
 
How do i perform binary operations, such as addition, subtraction, multiplication and division..
[2 replies] Last: I am kinda confused on how the binary division is performed. Because i... (by JohnJH)
While loop still runs when I don't want it to?
 
Even though I have it set so Playerturn is false after one press it still runs the loops. I only want it to be able to press one key once, but instead I can pre...
[10 replies] Last: OMG I FIXED IT. I thought of how to fix it last night, but only tried ... (by Dominic4774)
by tatai
Reading csv file
 
I have a CSV file like this 1896,1,0,0,0.0074,0.0214 1896,2,0,0,0.0104,0.0302 1896,3, 0,0,0.0078,0.0225 1896,4,0,0,0.0088,0 1896,5,0,0,0.0068,0 I need...
[5 replies] Last: I have solved the problem!! I read each line upto the ',' and break it... (by tatai)
RSA encryption program help
 
I'm working on a project for one of my courses and I'm stuck. We're suppose to develop a program that can generate an RSA key pair, encrypt and decrypt files. I...
[no replies]
Bidimensional array of mixed type?
 
Hello everyone, i'm new to this forum. Trying to master the c++. Here's my first question: How can i create a bidimensional array that contain both int...
[6 replies] Last: @mutexe I would like to initialize the descriptions one for all items... (by Amiplus)
2D-array member initialization
 
const int NumMarbles = {5, 8, 4}; const int NumColours = sizeof (NumMarbles) / sizeof NumMarbles ; const int NumMarblesAdded = {{1,2,3}, {2,0,1}, {2,1...
[5 replies] Last: const int foo ; int **bar = foo; //error Can be used like is not ... (by keskiverto)
Base class implementing interface
 
Hey, I have a little design issue and i hope you can help me out with this. I have 3 interfaces defined: class IBase { public: virtual void methodIBase() = ...
[4 replies] Last: If you used virtual sub-classing, you get rid of the problem, and you ... (by ShodanHo)
by Blank
random numbers
 
i need help writing a program that display two random numbers being added to each other. when the user is ready and has worked out the problem. the user will si...
[1 reply] : See: http://www.cplusplus.com/reference/cstdlib/rand/?kw=rand The ex... (by coder777)
Help with program involving structs and selection statements
 
Hey guys, I wrote this program and everything is working fine except this one part. I have to ask the user to pick a number that corresponds to a 'player' in t...
[8 replies] Last: You're welcome - glad it worked out :) (by MikeyBoy)
by Nefri
Table from CSV
 
Hello, its there any easy way how to get "table from CSV" to two dimensial array ? Example: 1997,Ford,E350,2.34 2000,Mercury,Cougar,2.38 to array on ...
[2 replies] Last: using fstream/stringstream and getline, it would be relatively easy: s... (by coder777)
Transforming Vector to a Dynamic Array
 
Hello :) I am a C++ newbie and I am working on my "Driver's Book" project for my university. I have a complete code done (With export to CSV, HTMl...all that i...
[4 replies] Last: Thank you again Albatross. Really helpful information. I think i under... (by olirehacek)
by Zuborg
cin.getline() error
 
If i set "n" on any value, that for{} allows me to set only n-1 values for buffer. Can anyone explain to me what's wrong? Thanks. header: struct Element { ch...
[2 replies] Last: Problem solved. Thanks (by Zuborg)
One dimensional arrays
 
I'm confused on constant arrays. const array ={0} what is the purpose of having a constants when that array would be changed later on. Can someone give an ex...
[4 replies] Last: thanks guys!!! (by fahmankhan75)
November 2013 Pages: 1... 2728293031... 80
  Archived months: [oct2013] [dec2013]

This is an archived page. To post a new message, go to the current page.