General C++ Programming - February 2014 (Page 21)

create .bmp file
 
Hello there, I now have a file with X, Y, Z and Intensity (0-1) of all the pixels. I want to crea...
[1 reply] : There are two ways to do this. a) Study the BMP file format and the... (by Catfish666)
static variables !
 
Hello, it's very simple but I don't know how to do. How can i receive in output 1,2,1 ? I need to ...
[7 replies] Last: Ah, right, yes - well-spotted, Disch! I wasn't paying attention to th... (by MikeyBoy)
SDL (C++) Paint Program
 
Hello, I'm attempting to make a Paint program, and my main problem is that I cannot seem to get ...
[3 replies] Last: On which surface should I draw the "brush" that moves with the mouse?... (by Disch)
by Jexen
Noob here, basic C++ problem, need help
 
Wont let me upload photos here so i uploaded it onto the photo sharing site Imgur. Looking for so...
[no replies]
To call a class method/function from a .hxx file in a .cpp file
 
How do I call a class method which is defined in a .hxx file separately to a .cpp file? Is it any di...
[1 reply] : if you want to define it in the cpp file, then you should use the scop... (by nvrmnd)
Coplexity of the algorithm
 
Hi All, I have been reading about evaluating the complexity of algortihms, etc..etc..though I am ve...
[7 replies] Last: Hi All, Thanks a lot for clear and concise clarfications...These post... (by venkatacplpl)
Checking Dynamic Memory Cross-platform
 
Suppose: cin >> number; pointer = new type[number + (rand()%number); So, I wont know the me...
[4 replies] Last: @long double main I need to track it. I'm preety sure that is OS depen... (by iQChange)
by parsap
Delete an object in multi-thread situation
 
I have to delete an object at a time that I don't know it's held by another thread(s) or not. For e...
[2 replies] Last: Sounds like a job for std::shared_ptr. Would you please give an exa... (by parsap)
Why is my output wrong?
 
I'm trying to write a program that shows the output of the summation formula from k=0 to n C_(n+1)= ...
[1 reply] : You have only initialized the two first elements in the array. (by Peter87)
by leo255
Using a struct/char array for Tic Tac Toe Game
 
Hello, I spent my entire winter vacation basically taking a 5-unit Calculus class (in 5-weeks) for ...
[1 reply] : #include <iostream> typedef char board_type ; bool check_win( con... (by JLBorges)
How to make a Derived Base Dependent?
 
I have a class Base (abstract, with pure virtual) and Derived (which inherit Base). I use this: ...
[4 replies] Last: Thanks. Solved :). (by iQChange)
End program by pressing enter key?
 
I'm trying to end my program when the user presses the enter/return key. I'm trying to do this with...
[3 replies] Last: Either read in a complete line, and use s string stream to extract whi... (by JLBorges)
Write a program that reads a string and outputs the number of times each lowercase vowel appears in it.
 
What i am doing wrong.. #include <iostream> #include <string> using namespace std; int vow...
[1 reply] : Please use code tags. http://www.cplusplus.com/articles/jEywvCM9/ Fr... (by Austin J)
Skips a Step
 
#include <iostream> #include <string> #include <cstdlib> using namespace std; //Class functi...
[1 reply] : Please don't double post. http://www.cplusplus.com/forum/beginner/123... (by giblit)
Continue statement in nested loop
 
Hello, I was wondering how I could use a continue statement that continues in a nested loop. For e...
[5 replies] Last: Don't use goto, just to exist from a loop. Some say never use goto at... (by kbw)
Mathematical fomula in C++ windows32 application
 
Hello, I am writing a program to calculate the scores for a decathlon and I am having trouble apply...
[1 reply] : http://www.cplusplus.com/doc/tutorial/operators/ (bitwise operators) ^... (by ne555)
Iteration strange output
 
Hey guys, this code works perfectly fine if n is 0 or 1, except for the fact that when it is any h...
[8 replies] Last: Well that works lol. The program runs just like I'd want it to now. Th... (by fizanimtiaz93)
Random matrix
 
I am trying to create a random 3x3 matrix and print it out in a text file using basic functions. My ...
[2 replies] Last: I forgot to add "cout << endl;" between the two for loops. Thank you f... (by Binarydude87)
passing 2d array created using <vector> --simple example
 
Hello, I am trying to pass a 2D array called f (coming from a text file with 9 columns of numbers a...
[5 replies] Last: Got it. Thanks a lot! (by adamsheimat)
counting vowels
 
so question is to count the # of vowels and print it out. But my answer keeps saying '0' #include <...
[4 replies] Last: You can also wrap your entire code in a while loop, which should solve... (by Smac89)
February 2014 Pages: 1... 1920212223... 33
  Archived months: [jan2014] [mar2014]

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