Beginners - September 2010 (Page 6)

problem of effective C++ 38 : model "has-a" through composition
 
class Address {.....}; class America : public Address{.....}; class Person{ public: .... private Address address; America america; ...... ...
[6 replies] Last: Thank you so much, now I could continue my research. (by stereoMatching)
by tonnot
About classes and cpp and h files
 
At the moment I dont know why I must do have cpp a h files ... My code runs well using a simple h file. What advantages can I have if I use a cpp file ? A...
[1 reply] : What? http://www.cplusplus.com/forum/articles/10627/ (by Bazzy)
Calculations in a for loop not working properly
 
Hi everyone, I'm a total beginner to c++ and I am having a bit of trouble with calculations within a for statement the goal of the program is to calculate the...
[1 reply] : Suggestions: 1. fix your formatting - I can't tell where your block... (by kfmfe04)
What is next-to-last value from list?
 
Hi, friends I didn't understand what is the meaning of find the next-to-last value from the list? Is a value after the last or where? I know it's a ...
[2 replies] Last: thank-you very much.... (by krishan22)
by atrosh
How to check if T (in template class) overloads '<' ?
 
Hello. I have searched a lot of forums/tutorials but cannot seem to find an answer to my question. I am writing a custom vector class: template <typename T> ...
[14 replies] Last: IMO boost concept_check does everything needed: http://www.boost.org/d... (by Bazzy)
by hotham
Polynomial Root Solver
 
Does anyone have a link to a polynomial root solver in C++ for more than 3 roots? Thanks!
[1 reply] : Off the top of my head, I would look into: Mathematica, Matlab, and R,... (by kfmfe04)
save files with different names
 
i can't find any better place to get a clear answer to my q? i have just make some programs in c++ but: 1- i want every user of the programe when he ent...
[1 reply] : 1. You can use strings: std::string name; std::getline ( std::cin... (by Bazzy)
by Kness
Frustrated with problem.
 
My instructor gave us an assignment, and he even listed the beginning example we are supposed to use with the program. The program is supposed to allow users to...
[19 replies] Last: Unless your phone's keypad has uppercase and lowercase letters, you ca... (by closed account 3hM2Nwbp)
Text RPG - Damage function (Random within range)
 
To try and further my knowledge with C++, I am currently working on a text RPG. Currently, I am working on a damage function which chooses a random integer with...
[5 replies] Last: Hi Disch, actually it is not really that bad for a person to do a text... (by sohguanh)
Display ASCII chars spreadsheet - Any thoughts?
 
Yes, this is a homework assignment, however once again I am just trying to spruce it up some with the x values being displayed (not required for the homework). ...
[4 replies] Last: That worked and has gotten me on the right track. Thanks. Being a be... (by Flynn380)
Is it assignment operator ?
 
Hi, I have a doubt that, suppose if we have a class call account and objects are current and saving . account current(125,6); account saving=cu...
[5 replies] Last: C++ is so flexible that sometimes I am "afraid" :O I think if you... (by guestgulkan)
by wlv
About the template class.......
 
I am a beginner with c++, and I cannot run the program while I can sucessfully compile the program. Here are my code: templateclass.cpp ------------------...
[1 reply] : the template functions cannot go in a separate cpp file. They must al... (by Disch)
linker error, undefined reference?
 
I'm getting some strange linker errors in my C++ project: obj\Debug\main.o||In function `_ZSt19__iterator_categoryIPSsENSt15iterator_traitsIT_E17iterator_...
[1 reply] : undefined reference to `Command::PVT' In your class you have belo... (by sohguanh)
by Maerle
Question from an university test
 
1)What is the purpose of the scope resolution operator in C ++? Illustrate. 2)In C ++, which functions can access private data of a class? 3)How is it pos...
[2 replies] Last: 2) There's an old joke saying "C++ : Where friends have access to you... (by sohguanh)
Right Triangle calculation program question
 
I'm creating a right triangle calculation program to determine whether or not the user input of 3 sides of a triangle equals out to a right triangle or not. For...
[2 replies] Last: 2) you can't do direct == or != comparisons with floating points beca... (by sohguanh)
2 beginner C++ problems
 
Okay I am a newcomer to C++ programming and have no experience in programming prior to this so I decided to take some college courses on programming. We are cu...
[2 replies] Last: As well, I do believe you're stuck with | and _ as your borders. ... (by sohguanh)
Enumeration Question
 
Hi folks, I'm taking a c++ course in school atm, and one of my assignment questions is giving my trouble. I'm building an interface for a deck of cards, and...
[1 reply] : Only identifiers can be used as enumeration elements. An identifier ca... (by helios)
problems deleting elements in vector while iterating through?..
 
I'm working on the bunny problem from http://www.cplusplus.com/forum/articles/12974/. My program crashes sometimes when it's deleting bunnies from the vector...
[7 replies] Last: ! Holy crap, thanks, it works now! I removed the increment from the... (by pabloist)
by pauyon
Printing, and Sorting a 2D char Array?
 
I'm trying to write a program that initializes an array of names in the format: "Xxxx, Yyyyy" where x is the letters of the last name and y is the letters of th...
[3 replies] Last: Try the standard functions: http://www.cplusplus.com/reference/clibra... (by Bazzy)
by Maerle
A file of exemples of struct (exercises, programs, etc) in format .cpp
 
Does someone have a file with exemples of struct (exercises, programs, etc) in format '.cpp' in your computer or know some site to get it?! if you have in yo...
[4 replies] Last: For exemple, last semester i did some exercises of C of a book(how to ... (by Maerle)
September 2010 Pages: 1... 45678... 32
  Archived months: [aug2010] [oct2010]

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