General C++ Programming (Page 29)

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 spectral)
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)
Permutations
 
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)
by zxrp
Function to find sum of certain word in text file:
 
Hi everyone, I've written a function that has to receive a word as parameter, and then has to find t...
[1 reply] : if (temp ==wrd ) You're comparing characterrs, not strings. And that... (by kbw)
by zxrp
Problem finding words in text file
 
Hi everyone, I was given a task where we were instructed to find words in a text file via functions ...
[2 replies] Last: Thank you, clearing the error flag fixed the second function. However... (by zxrp)
finding maximum value in a map
 
Hi. Suppose that a map is defined thus: map<sttring, int> mymap; I wanna find k maximum value...
[1 reply] : You can follow this approach if k is very small with respect to N (the... (by abhishekm71)
my property problems
 
i did these class property: /*properties - how use create 1 property with macro: PROPE...
[no replies]
Bakery Billing Program
 
So, the point of this program is to make simple billing program for a bakery. The program starts by ...
[7 replies] Last: I meant calcPrice(), but here it is: #include <iostream> #include... (by jesslich)
Reading One digit at a time
 
Ok, So I want to do the following, Please help me out. I want to input 150 1 digit integers, from 0...
[2 replies] Last: Thank you! (by newbie456)
Pages: 1... 2728293031... 49
  Archived months: [jun2014]

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