General C++ Programming - July 2012 (Page 19)

by rithan
I need the coding for the class ..Urgent..
 
Question: Please provide complete definition of class AB. thera are 3 attributes. attributes aa is constant...watever u found out juz give it to me. int main()...
[2 replies] Last: I need the class part coding for the above int main.... (by rithan)
candy sharing
 
I been working on candy sharing problem A number of students sit in a circle facing their teacher in the center. Each student initially has an even nu...
[no replies]
Ifstream problem with displaying lines.
 
I am trying to display the contents of each file at a time with this function, but the problem is it is displaying numberOfLines correctly but they are all bl...
[no replies]
Creating a Bitmap from code
 
Hi everyone! Im a little new to c++ and this forum, so please correct me if this is not in the right topic area. My question is how can I create a Bitmap image ...
[no replies]
std::cout constructor
 
For a little while, I've sort of been trying to come up with a way to form an std::iostream object that inputs and outputs to the console. To do so, I'm trying...
[2 replies] Last: That works. (I do feel like making it an actual std::iostream object,... (by Whovian)
by stbb24
display unique numbers
 
void randNumber (int n1, int n2, int a ) { if((n1 == 4) && (n2 == 3)) { b = rand() % 7; c = rand() % 4; randNumber(b, c, a);...
[4 replies] Last: Here is a sample run 1st Run 4 5 6 7 11 12 13 14 18 11 4 21 25 2... (by stbb24)
For Loop terminating, Quick problem!
 
Hey! I'm trying to do a while loop within a for loop. However whenever I run the program, it only does the 1st iteration of the for loop, and then exits :( I do...
[2 replies] Last: Gotcha, so I gotta put 'n' inside the for loop. Psh. I'm so lame. (by closed account zbREy60M)
Drunken jailer
 
A certain prison contains a long hall of n cells, each right next to each other. Each cell has a prisoner in it, and each cell is locked. One night, the ja...
[3 replies] Last: Ah you're right. It looked so similar though, was kinda exciting. (by ResidentBiscuit)
template <class C, class T> void my_f(const C<T>& aContainer);
 
Hi all, Is it possible and how could I define a templated method like this : template <class C, class T> void my_f(const C<T>& aContainer); The syn...
[4 replies] Last: ¿what is the problem with method 1? (by ne555)
by axtroz
Program structure optimization
 
Greetings! I am sorry for my poor English, but I need some help or maybe an advice. I am writing an application that will store elements into a MySQL database....
[1 reply] : I'm using a 4-column table and a std::list<Properties> to get the job ... (by axtroz)
Perfect forwarding with variadic template function
 
I think what I'm trying to do is called perfect forwarding but I can't get it to work. #include <iostream> void bar(int&) {std::cout << "int&" << std::endl;}...
[2 replies] Last: Thank you that works perfect. (by Peter87)
Atkin Sieves
 
I am trying to write a sieve of Atkin and came across the following articles, each saying different things. http://programmingpraxis.com/2010/02/12/sieve-of-...
[no replies]
void* to an array
 
This program gives the following error : lvalue required as increment operand. int main (){ int a = {1,3,4,6}; void *ref ; ref = &a ; cout << "\nEl...
[10 replies] Last: thanks a lot guys , typedef 's made it easier to understand things ar... (by Raman009)
Manage Credit Card Account Program.
 
I have a group project coming up in my C++ class. I do not want any codes or anything. I just need some advises, ideas or any tips anyone can give me to make th...
[no replies]
by shaeri
templates and abstrace classes
 
Hi, I am trying to write a very general code that serves sort of as a framework for doing some task My code has 2 classes class1 and class2. class1 and class2...
[9 replies] Last: > Why do i need to announce the types via typedef ?? It comes in hand... (by JLBorges)
by MikeTV
Redirect ostringstream to console?
 
I have a DLL which uses AllocConsole() to create a new console window. I would like to use an ostringstream to print out information to this console like so: ...
[4 replies] Last: > how would you redirect an ostream to a window created using AllocCon... (by JLBorges)
Looking for a way to find the name of random files and store them into an array.
 
I am new to programming, I have completed my first year in college and I am trying to get better at programming and join projects and code different things to g...
[3 replies] Last: tmain is a Win32 mung of main . (by Moschops)
Moving along a vector
 
I have two arrays containing the x and y positions of two points - the target position and the origin position. To move a point along this vector, would I be co...
[6 replies] Last: Well, the problem is that the dotPos coordinates seem to ignore my col... (by GamerKid)
'sibling' classes?
 
Hello, Is it possible to share the part derived from a base class amongst derived classes? I am attempting something like this: //A 'shared' base class...
[5 replies] Last: you have to use virtual inhritance: class BaseClass { protected: int... (by viliml)
What do I need to know before starting game programming in C++
 
I'm currently going through the "TheNewBoston" C++ tutorials (Link at the end of this paragraph) and finding them easy enough to understand, I feel like I have ...
[6 replies] Last: Ok, thanks for the advise :D (by DJLad16)
July 2012 Pages: 1... 1718192021... 30
  Archived months: [jun2012] [aug2012]

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