General C++ Programming - January 2011 (Page 17)

Find all the sequences of integers that the sum equal the number s
 
With a positive integer s read from the keyboard, find all sequences of 2 or more consecutive intege...
[1 reply] : // try this #include <iostream> #include <conio.h> using namespa... (by asay)
by declan
Forward declaration with default parameters
 
Hey everyone. I have a class that I have split up into a .h file with the function declarations and ...
[2 replies] Last: Thanks! (by declan)
Simple text file reading
 
I want to read text file(.txt) line by line in c++. each line contains instructions like copy(m...
[1 reply] : Hi. Excuse me, I didn't understand your question exactly. But if you... (by majidkamali1370)
by lluoc
Reserving memory for **
 
If I have a ** (specifically a int ** in a header file) and I want to reserve memory for it (in a co...
[2 replies] Last: Dammit, i should have thought of that. Thanks (by lluoc)
Can we prevent function overloading?
 
Hi, one of my friend ask me simple question but did not have answer. can be prevent doing functio...
[5 replies] Last: haha, foiled AGAIN! seriously though, I never even thought about do... (by closed account 1yR4jE8b)
functions vs function objects
 
Can anyone explain,seeing that their implementation is quite similar when should we use function obj...
[12 replies] Last: [quote=western] 10 11 12 13 14 class ABC { public: std::... (by blackcoder41)
Object Bytes
 
Hi. How can I print bytes of an arbitrary object? I don't know anything about it's size. for exampl...
[3 replies] Last: It works with simple data types, and if he wants to change the endiann... (by PiMaster)
fixed
 
fixed
[1 reply] : You do know that Wikipedia has example C++ code, right? http://en.w... (by PiMaster)
by fhg38
Inherited constructor gets confused with copy constructor
 
If I uncomment the line below I get this error message in VC++ 2008: error C2664: 'TestObject3::...
[6 replies] Last: Thanks, it does indeed say this the tutorial, I must have thought I sa... (by fhg38)
by primes
reads ten numbers and prints the largest and smallest numbers entered.
 
#include <iostream> using namespace std; int main() { int count; double num; cout<<"pl...
[4 replies] Last: Improvable but simple version. (Requires you have the WANOP.h file ins... (by Kyon)
Heap corruption while freeing memory
 
I have following code in which I am getting "Heap corruption detected" message while trying to freei...
[4 replies] Last: HOw can we check whether memory is allocated or not? You can't (at l... (by ne555)
singelton object and resource deallocation ??
 
Hi, I am using classical singelton pattern in C++ for a class (using a private static pointer to ...
[3 replies] Last: Thankyou so much for your kind replies. I was mainly interested in... (by enliten)
by Icenel
ASCII in array
 
printf("%c", 6); out put is Spade Symbol card I don't know this ascii or not. if you have a...
[1 reply] : char spadedeck = { "2\6", "3\6", "4\6", ... ... (by Duthomhas)
Histogram issues
 
Hello I've written a program that makes the user input positive numbers, and a negative number. The ...
[1 reply] : Output one asterisk std::cout << '*'; . Repeat it n times. To read... (by ne555)
Encoding Headaches... and JNI
 
Hi people, I am having trouble with an encoding issue. Through JNI (java native interface), I rec...
[4 replies] Last: Thanks Duoas!! I just resolved the problem thanks to your advices. ... (by supertreta)
Passing by reference, returning an object
 
Hi everyone, in the code below, 1. and 2. show how I'd like to be using my function.. and 3. show...
[3 replies] Last: Thanks for the insight simeonz. The reason for the overkill: The re... (by thomas430)
by fat321
page by page
 
hi my friends i want show my program output page by page, because it is too long. how i do it? tha...
[1 reply] : http://www.cplusplus.com/forum/general/34144/ (by king214)
Regarding Histogram - confused
 
I need help with my code, what i'm trying to accomplish is when the user using my program marks a st...
[4 replies] Last: Thanks mate. (by Deadmau6)
by fat321
page by page
 
hi my friends i want show my program output page by page, because it is too long. how i do it? tha...
[2 replies] Last: \\random code cout << "press enter to goto next page" << endl; ci... (by king214)
by Bv202
Multidimentional array
 
Hey, I know you can assign values to a mutidimensional array this way: int numbers = { {1,...
[4 replies] Last: So you really have to assign them one by one? Ok, thanks :) (by Bv202)
January 2011 Pages: 1... 1516171819... 24
  Archived months: [dec2010] [feb2011]

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