General C++ Programming (Page 5)

by vlkon
Handling C++11 <random> - separate class and *.cpp file
 
Hello everyone, I wanted to ask for an advice about how to create .cpp file (new class) that will h...
[4 replies] Last: I think that you've got some typos. Missing semicolon on line 16 rand... (by ne555)
by judo11
How to count the students who got the highest and lowest score?
 
I can display the highest and lowest score but I can't display the number of students who got the hi...
[2 replies] Last: Thank you sir I learned a lot from you. (by judo11)
by Mats
Pathfinding
 
I'm trying to find vertical paths of length n through a 2D grid of numbers. Paths may connect orthog...
[11 replies] Last: You can initially copy the data stored in the grid into arrays of x,y... (by keskiverto)
A code that doesn't work
 
Hello .My program doesn't behave as I expect it. This code doesn't prinnt 'c', why? char **w...
[4 replies] Last: cout <<strlen(audioBuffer); outputs 50972 and audioBuffer is defin... (by hooshdar3)
Unexpected Output
 
In my code below, if you enter an incorrect age, it starts the program over.. After you enter a corr...
[3 replies] Last: a) ok b) i didnt say use the namespace called std. i said that specifi... (by Little Bobby Tables)
by Anns
Void pointer
 
Hi, I have a query regarding void pointer. Can any explain what happen when below snippet runs. ...
[12 replies] Last: Thanks. Here thing is that A.cpp includes B.h also. (by Anns)
Socket Programing
 
Is there a simple demonstration that someone could show me on how to take user input from a C++ prog...
[2 replies] Last: I think we can cheat a little bit, use the specific URL instead of inp... (by lsk)
Binary search tree (Distance from node to root)
 
Hi, so, I need some help, I'm new to this BST thing, so, I don't understand most of the function reg...
[3 replies] Last: Kind of that, does it work as you want ? (by lsk)
Dynamically allocate array of strings
 
I know I can allocate it this way, on the stack: char* str ; for(i = 0; i < 5; ++i) { s...
[6 replies] Last: Another way is like this: int *data = new int [width * height]; int ... (by joe7)
'SFML/Audio.hpp' file not found ?
 
I am using SFML for the very first time, and I have no idea why I'm getting this error. I'm pretty s...
[3 replies] Last: Thank you both so much. It turns out I had messed up a bit because I d... (by tiny screaming yak)
by zxrp
Counting number of occurences of a word in a text file [UPDATED]
 
I have to write a function that accepts a word (in my case the word is "the") and file pointer, and ...
[1 reply] : That shouldn't compile. Fix that then try again. BTW, std::toupper() o... (by Duoas)
scanf/printf vs cin/cout
 
As it is known that C scanf/printf works faster for Input/Output compared to cin/cout of C++. I r...
[4 replies] Last: @myesolar: Yeah, just that I don't know C# lol, nor I feel like switc... (by newbie456)
by chin
beta and theta value had interchanged.Can I know where the problem is?
 
#include <iostream> #include <iomanip> #include <cmath> using namespace std; void input_from_u...
[2 replies] Last: Can give me some suggestions to solve that? Or I need to redo the whol... (by chin)
by manojg
Difference bewtween these two definition of derived class constructor
 
I have one base class and one derived class. class Base { protected: int a, b; pub...
[1 reply] : The member variables are constructed before the body of the class co... (by keskiverto)
by zxrp
Problem with my searching function
 
Hey guys, I have written a function that is supposed to find all the occurrences of a given word in ...
[1 reply] : http://www.cplusplus.com/forum/general/112111/ > while (getline(*fil... (by ne555)
C++ program to benchmark a pc
 
Hi guys i'm a class 12 student(India). I was asked to create a c++ project for my 12th class( a part...
[no replies]
C++ (Using for loop)
 
#include <iostream> using namespace std; int main() { char asterisk = '*'; ...
[4 replies] Last: Thanks man once again :D (by newbeee)
Array
 
I have a problem with my code seems there is an error at some part. Please help me. #include ...
[3 replies] Last: Oh thanks man , well explanation ! :D (by newbeee)
Returning a dynamically allocated array from a function
 
This a very simple program I created because I dont understand how do this. My goal is to be able t...
[1 reply] : I'd recommend using std::string, it'll make your life much much easier... (by myesolar)
by joe7
cross-platform issues
 
I'm rewriting an old Win32 painting program to support more platforms using FLTK. So far so good on ...
[2 replies] Last: It helps a lot, thanks. (by joe7)
Pages: 1... 34567... 46
  Archived months: [may2014]

Cannot post in this page. To post a new message, go to the first page.