General C++ Programming (Page 3)

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] : > 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)
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)
static vs ordinary variables
Is it more expensive to use too many static variables instead of ordinary variables? If yes, then h...
[7 replies] Last: got it, thanks all O' ya (by danicpp)
by mushyz
Problem with code
I am trying to generate a random number between two numbers that the user gives me. I can't figure ...
[3 replies] Last: const variables need to be initialized when they're declared and they ... (by wildblue)
Functions does not return new value..
New to this site! In my program below, in the getage and get level functions, if an incorrect input...
[7 replies] Last: redo the whole process? No. Just add a loop, which is straight-fo... (by AbstractionAnon)
Hey I am trying to generate some lists of permutations of ints but I can't make std::next_permutati...
[5 replies] Last: @frankellis: google "powerset", and then "algorithm to generate the po... (by JLBorges)
C++ on OS X vs Windows
I am beginner in C++. I have a Macbook Pro and a stationary PC with Windows 7 on it. My question ...
[2 replies] Last: I program on a macbook pro. I am almost exactly like tiny screaming y... (by programmerdog)
Pages: 12345... 44
  Archived months: [may2014]

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