Beginners - March 2011 (Page 30)

Inserting data into vector of structs
 
I am trying to insert member data into a vector of structs, but I receive the errors: main.cpp: In function âint main()â: main.cpp:28: error: âclass std::...
[6 replies] Last: Yep, that's cause that's the vectors constructor arguments. And even t... (by hanst99)
declaring vectors issue (1,2)
 
I'm trying to put a series of classes into a vector but weirdly visual studio keeps saying my object could be declared as an int "which needs an identifier". ...
[22 replies] Last: code other than declarations or definitions. (by hamsterman)
Address of Operator Suffix
 
Hi I am new to C++ and am having a problem. I am currently working on references and pointers and I keep coming accross lines like this SimpleCat::Simple...
[2 replies] Last: SomeType& is a reference to SomeType &Variable is the address of V... (by Bazzy)
by chipp
play algorithm
 
let's play algorithm here, anyone wanna contribute?
[11 replies] Last: You can read my new article on encryption: http://cplusplus.com/forum... (by ultifinitus)
by lalala
a while loop for counting in the average of the total numbers.
 
I have to keep track of the numbers whose total is less than 100. And I don't want to count the last number that makes the total over 100. Here is my code. Than...
[2 replies] Last: thanks! (by lalala)
random typedef question
 
I was wondering if useing typedefs c++ would let you do this: typedef int newint; typedef newint newnewint typedef newnewnewint //rapeat above 40000000 times n...
[6 replies] Last: Macros are evil. Macros easily lead to cryptic errors on compile time... (by hanst99)
Problem with <iomanip> alignment.
 
I'm having trouble aligning some text with setw and the left alignment. I'm not sure if it has something to do with the fact that I'm printing from a function. ...
[17 replies] Last: You call setw after the function. If you want to make sure that 20 is ... (by hanst99)
friend function
 
hello every body i have really hard time nderstand my home work :$ if any one can tell me Digital studio for editing and printing photos needs to ke...
[1 reply] : Ignoring that text, a friend function is a function that is declared a... (by hanst99)
by vlad61
Pancakes!
 
Hello. On the final star of Pancake Glutton http://www.cplusplus.com/forum/articles/12974/ I cannot figure out how to go about telling the computer to pri...
[10 replies] Last: Here is my solution, it works like a charm, except if the user enters ... (by vstuen)
Need some help here please!
 
Can someone explain to me, what is wrong about this code: char astring ; int i = 0; /* Using scanf isn't really the best way to do this; we'll talk about ...
[2 replies] Last: line 5: error: expected initializer before 'char' first error is line ... (by TotalMax)
by mowie1
my solver error
 
I am getting an error sudoku.cpp:9: error: expected initializer before âvoidâ #include <iostream> void sudoku_board(int board ) { } can anyone help...
[19 replies] Last: Thanks I am new at this.....sorry (by mowie1)
linking error
 
Hello all, I am facing the below error in my program. Program compiles for the first time correctly and shows output. However, while I run for 2nd time, the ...
[4 replies] Last: ok thanks. I just started with windows programming and this was my fir... (by abhiverma812)
by Bog
randomize symbols in slot machine game
 
In this assignment you will create a slot machine emulator. This slot machine will cost 1 credit to play and pay out 5 credits for each line you win on. It ge...
[6 replies] Last: Try that code. It's simple but works and shows stuff pretty clear. ran... (by Breadman)
object reference
 
I am new to this forum concerning this great language and i have some questions concerning references: 1-why do i make a reference for and object as i can use...
[5 replies] Last: None. But when you don't return a reference to y you do NOT return y i... (by hanst99)
FrameDelay
 
In my book is says: int m_iFrameDelay; is to indicate the amount of time between game cycles in milliseconds. Can anyone post a link to...
[3 replies] Last: I have done c++ console programming and i find that quite simple. ... (by hanst99)
by rrandr
Help with structures
 
heres our project in programming ..we make a bank system using structures.. so heres the problem.. i input some new accounts and then i want to add balance in ...
[3 replies] Last: if(accountrec .account_ID == Iaccount) { fflush(stdin); printf... (by hanst99)
What does this mean?
 
I've been learning how to use C++ for a week now, but I can't seem to figure out, why something is that. The tutorials have knowledge testers, but I can't figur...
[4 replies] Last: Well, many people believe that the switch statement resolves to someth... (by hanst99)
Is this a data type?
 
In my class called GameEgnine it has: GameEngine* m_pGameEngine; Is "GameEngine*" a data type? Which is a pointer to the class?
[4 replies] Last: They are variables, of course. The same rules that apply to variables ... (by hanst99)
File I/O problem (1,2)
 
Hi, Im new to file IO in C++.I couldnt find the problem with the following code. There is actually data for 2 person in the dat file.But when I try to read,it ...
[26 replies] Last: LOL, if you want to try C::B, then try this, download only the IDE and... (by matsom)
Sum of Square numbers
 
Hello Guys, I want to create a program that will show the sum of the squares of the numbers: For example user inputs 4 and 6, The program outputs 4*4+5*5+6*6 T...
[11 replies] Last: Thank you very much hanst99, The Program runs perfectly, :D (by Uzumaki)
March 2011 Pages: 1... 2829303132... 52
  Archived months: [feb2011] [apr2011]

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