
please wait
by mzimmers
resizing a string object
|
Hi - I'm constructing a string object by an initial assignment and a large number of concatenations (using the += operator). After the string gets to a certa... |
Aug 28, 2012 at 10:14pm
[4 replies] Last: I appreciate the feedback anyway; it's a good reminder. Apart from th... (by mzimmers)
|
by CppJim
The Very Evil Deck of Cards
|
Hello! I have been tasked with in my opinion a hard programming task. It is well, Challenging to me.(I just started C++ :P) The main goal is to print out a "... |
Aug 28, 2012 at 9:54pm
[2 replies] Last: xD Thank you very much! (by CppJim)
|
by samrux
Header files and C++ files
|
Some questions: 1.-What's the difference between a .h and a .cpp, when used for functions and classes? 2.-What exactly happens when I include a file in a C++... |
Aug 28, 2012 at 9:31pm
[13 replies] Last: You should only include headers in files that need it. IE: if main... (by Disch)
|
by Madguy
Boolalpha question
|
I was practicing with string methods and I wanted empty() to return true or false instead of 1 and 0 so I used boolalpha but now it returns 4098false or 4098tru... |
Aug 28, 2012 at 8:27pm
[4 replies] Last: Yeah you are right, thanks (by Madguy)
|
by grutsch
sorting of classes not working
|
Hi all. I have a class "ExampleSentences" with a private member std::string _simpHanzi; I have another class "Vocabulary" with a private member std::ve... |
Aug 28, 2012 at 8:07pm
[9 replies] Last: Did you added const to getSimpHanzi() in the declaration and definitio... (by R0mai)
|
by Ch1156
Polymorphism program questions (1,2)
|
Ok so i was watching this video on polymorphism and it was way better than the others, i kind of understand stuff better but there are some things im confused o... |
Aug 28, 2012 at 8:01pm
[21 replies] Last: I also agree with naraku9333. You don't want to get ahead of yourself.... (by coderguru)
|
by vckngs7
warning: adress of local variable '<variable>' returned
|
I am trying to pull from my .bashrc an environment variable CUSTPATH. I want to store the various directories in this variable in a vector and then return a poi... |
Aug 28, 2012 at 7:57pm
[1 reply] : The error is just what the warning says. You're returning a pointer to... (by Athar)
|
by EindacorDS
Question about class access functions
|
I'm trying to make a relatively simple game, and i'm working on how the inventory system will work. The "loot" in this game is actually paintings, and I have my... |
Aug 28, 2012 at 7:29pm
[2 replies] Last: so i can embed setOverallCondition() to run at the end of addAbuse()? ... (by EindacorDS)
|
by guyu
C++ primer 5th. Bad book? examples inside
|
I am on pg 70. Already they have stopped giving source code and there is not answer key. Seems like i am reading tons of definitions with out applying them to... |
Aug 28, 2012 at 7:27pm
[3 replies] Last: Have a look here: http://stackoverflow.com/questions/388242/the-defin... (by closed account o3hC5Di1)
|
by Aceix
Aid needed
|
I want to know why the print function displays val1 and val2 wrongly Code: #include <iostream> using namespace std; template <class> void print(); ... |
Aug 28, 2012 at 6:45pm
[3 replies] Last: Thank you all. It's working perfectly!!! (by Aceix)
|
by KodeBreaker
Creating "map", problem with array in a class?
|
Okay, so I'm working on a school project. It's a text-based RPG, and I want to have a "map" that the player can traverse through (not a physical map that shows ... |
Aug 28, 2012 at 6:27pm
[1 reply] : Hi there, Try doing the following: Map1.h: #ifndef MAP1_H #define ... (by closed account o3hC5Di1)
|
by Mrcerimo
Undefined reference to error
|
Hello there! i haven't written any c++ code in 3 months, so I'm little rusty. but today I opened an old project and tried to compile it and I got this error: ... |
Aug 28, 2012 at 6:10pm
[3 replies] Last: Most welcome, glad I could help. Have a nice day, NwN (by closed account o3hC5Di1)
|
by chameleon
Avoid prev/next pointers on a really big list?
|
I want a std::list<Node> with 10(at least) to 4000000000(at ambitious) elements. sizeof(Node)=24. Standard allocator works with one new per element, and... |
Aug 28, 2012 at 5:59pm
[2 replies] Last: Maybe a disc based random access db such as Berkeley DB http://en.wik... (by mik2718)
|
by vckngs7
Knowing which exception to catch
|
I am not fully understanding exception handling. My situation is as follows. I am trying to take an input to a program and parse it into an int. I am using a... |
Aug 28, 2012 at 5:33pm
[3 replies] Last: cannot figure out what kind of exception atof throws and how to stor... (by Cubbi)
|
by Wisely Done
2D platformer game
|
Hello, I'm still working on my 2D platformer game using SFML. I would like to ask, should I have a sprite for every tile I draw on the screen, or should I use o... |
Aug 28, 2012 at 4:58pm
[6 replies] Last: Ah, sorry. I was checking for collision only with the surrounding tile... (by Wisely Done)
|
by Aceix
I need some clarification please
|
This is giving me some kind of error I do not understand: //class templates & friend functions #include <iostream> using namespace std; void print(v... |
Aug 28, 2012 at 3:33pm
[8 replies] Last: Friends are indeed not actual members of classes (although I'm not sur... (by closed account o3hC5Di1)
|
by ts4525
Question about arrays
|
I am reviewing some C++ code and ran across the following line of code: class->method(label, array + integerValue) the code in question is: array + integer... |
Aug 28, 2012 at 3:28pm
[2 replies] Last: Hi there, Let's say integerValue has value 25. In that case what the ... (by closed account o3hC5Di1)
|
by xzbit
using class library..help pls
|
hello, i have these two projects one is a class library and the other one is a WinForm.. i add the Class Library in Winform as reference and so on.... in Class... |
Aug 28, 2012 at 2:58pm
[2 replies] Last: i already tried that first and got me an error,,i forgot to add ^ symb... (by xzbit)
|
by jojo25800
loop question.
|
How can i loop the question whenever the user inputs an invalid answer. for example.. /* question #1 */ cout<< "#1. 5+5=?" <<endl<< "A. 10" <<endl<< "B. 2" <... |
Aug 28, 2012 at 1:50pm
[3 replies] Last: the easist way but the dangerouest way: goto sentance maybe worked,but... (by ghking)
|
by zkl
Data type and its size
|
Hi, Can someone explain to me this data type and size. double denominator, numerator, result; Is it about having these numbers in decimals and not whol... |
Aug 28, 2012 at 7:57am
[7 replies] Last: Thanks for the explanations :) (by zkl)
|