General C++ Programming - June 2012 (Page 6)

Nested Class Object Return
 
Class A { public x; class B { public: int Y B search(int tempx,int tempy)//not constuc...
[1 reply] : struct A { // ,,, struct B { int a ; int... (by JLBorges)
Need help with a assignment
 
There's a flow chart for an algorithm that displays the numbers 20,40,60,80,100,120,140,160 and 180 ...
[11 replies] Last: It's a compiler setting, use google to search how to disable it or jus... (by closed account o1vk4iN6)
by apfela
While loop not exiting right after
 
I am having trouble when trying to exit. if i type -1 it still asks me "Enter gender" which I enter ...
[1 reply] : The check to stop the loop happens at the END of each loop. The entire... (by Moschops)
by cdf
use variable instead of ostream cout
 
I have a class that recieves a cout in the constructor ( ostream* ) SO::SO(ostream* s) { //...
[2 replies] Last: 1) in the constructor, save s into a private member class SO { publ... (by Peter87)
sstream, type conversion, SDL, and bleh.
 
Hey guys, Basically, what I'm trying to do is use SDL to make a window, then use SDL_ttf to print...
[2 replies] Last: Awesome, that worked great! Applied, and found that the numbers were ... (by roger911)
Macros, When and When Not
 
What type of rule of thumb or Hueristics that you go by when you decide to defined and use a macro (...
[5 replies] Last: [quote=ne555]M_PI in cmath. Use it. M_PI is not standard. (by Peter87)
Option some compiller for 1 problem in C/C++
 
I have a problem like that : int main() { char *s ="hello world"; s ='H'; ...
[7 replies] Last: You shouldn't be trying to "get this to run successfully". It's not s... (by closed account 1yR4jE8b)
reverse_iterator problems
 
Hi I am having some trouble with a string::reverse_iterator, my objective is to reverse a string us...
[2 replies] Last: Thanks vlad, I was using the != before I changed over to < to see if t... (by blueshift)
BST insert
 
When the current node's L or R pointer is NULL, the new node is returned, BUT where do we assign it ...
[4 replies] Last: but still when a base case is reached, meaning time to insert a new no... (by closed account 4ET0pfjN)
syntax: vector arguments as inputs to copy constructor
 
I would like to know how to initialise a copy constructor with vector arguments in general and for t...
[2 replies] Last: Hi, Thanks for your reply. I guess I'll stick with doing it that wa... (by dGold1947)
by Thommi
incrementation produces error
 
Hi, I hope you can help me with some (as I think) strange problem. I'm trying to read data out of ...
[10 replies] Last: I found the solution here: http://www.cplusplus.com/forum/articles/745... (by Thommi)
Dynamically allocated array of dynamically allocated arrays of characters
 
can someone please show me an example on how this looks ?! how would my class's constructor look, if...
[2 replies] Last: To delete the array stick something like this in your constructor: f... (by BlackSheep)
deleting the object problem
 
Hi , Why am i getting the error while deleting the object in the main . #include <iostr...
[2 replies] Last: Thanks Blacksheep it worked. (by bluecoder)
by aj3423
lambda in static member function
 
struct A { static void fn2() { } static void fn1() { auto x = [&]() { A::fn2(); }; x();...
[3 replies] Last: Thanks, seems a bug of MS compiler struct A { static void some_uni... (by aj3423)
exception alternative, returning object
 
Hi In the function below, I need to handle the case if the singleLinkList is empty. One option will...
[4 replies] Last: In that function there is constraint that the node should not be null ... (by dearvivekkumar)
Converting string array to const char*
 
I've seen and read plenty of examples on the web telling me how to convert from string to char, stri...
[4 replies] Last: for ( const auto &x : a ) { s += x; } c++11 <3 (by S G H)
Can't get this to work D:
 
Hi I'm trying to figure out how to get this program to output the models with the least price.But i...
[1 reply] : You uses uninitialized variables in the code bpmjc = basepri... (by vlad from moscow)
by t36
Recommendations on how to improve C++ knowledge
 
Hi all, I have recently finished studying "C++ How to Program" and "C++ GUI Programming with Qt...
[3 replies] Last: Hi, Thanks for your replies. I just studied the Qt to get a feel of h... (by t36)
by XzqtN
Must use Pass by reference
 
Hello all, I am faced with a challenge right now, I have an assignment that must be completed and I ...
[2 replies] Last: You pass a variable to a function by reference so value_type& variabl... (by therockon7throw)
Name a variable with the value of another variable?
 
Hi! Something's just crossed my mind: Is it possible to create a variable and somehow name it with t...
[3 replies] Last: You can use a hash table which can be used to relate a value to a stri... (by closed account o1vk4iN6)
June 2012 Pages: 1... 45678... 33
  Archived months: [may2012] [jul2012]

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