Beginners - February 2011 (Page 16)

program question
 
#include <iostream> #include <iomanip> using namespace std; //for single customers const doub...
[4 replies] Last: Yeah I don't know what I was thinking with the char holding 4 characte... (by DARKSUPR3MACY)
Negation
 
How do you negate a Boolean value: bool a, b; a = false; b = negate(a); What would the funct...
[4 replies] Last: The point of the question was to figure out how to negate a boolean va... (by Zhuge)
automatic objects
 
Hi All, It is said in Stroustrup "An object constructed by explicit or implicit use of a constr...
[6 replies] Last: Yeah, what I meant by objName being automatic was that the pointer its... (by Zhuge)
++ overloading
 
CmplxNo operator++ (int); //this is postfix ++ CmplxNo& operator++ (); //thi...
[5 replies] Last: ya . i get it. thx a lot zhuge ! ~Cheers! Neeraj (by navderm)
by linoch
writing definition of a function max
 
Hello, I'm a beginner of C++ and I'm trying to learn how to write a function from turingscraft.com. ...
[2 replies] Last: Yea... the error was from the site. I forgot to check for x = y = z. T... (by linoch)
by HMW
Sending array from one function to another
 
Hello all! I am working on a little project where I have a function that returns a value (integer...
[5 replies] Last: Hamsterman! Thanks again for your reply. I spent some time mutterin... (by HMW)
Arrays with characters
 
I want an array that has Boolean values associated with characters. How can I, for example, get the...
[1 reply] : By using a map: map<char,bool> theMap; theMap['a']=false; ... (by Athar)
by pooshi
Max Element in a vector of structs
 
Hello. I have a function that takes a vector of employee structs and I need to find the max salary i...
[1 reply] : Well, how is the compiler supposed to know what makes an employee "gre... (by Athar)
(Open GL) Making a colour transparent
 
I'm trying to create a side-scroller and I need to make a colour of my bitmap transparent. How do I ...
[3 replies] Last: Yes, it works for me, but you'll have to look up how to do a masked bl... (by rocketboy9000)
class pointers
 
I'm trying to create a class pointer that points to another class but I'm having issues. Its not wor...
[1 reply] : You can't point to classes in C++, you can only point to class instan... (by Athar)
&& Operator
 
Hi, I know that you can use '&&' to say 'and' for ints. However, how do you say 'and' for strings? T...
[6 replies] Last: @packetpirate: IMO, that's just uglier and slightly less readable. Whe... (by filipe)
by theraz
simple greeting code, subtraction error.
 
Hi, i just started with c++ like 1½ hour ago, and I'm experimenting a bit. I wrote a script that l...
[6 replies] Last: Thanks for all the replies, I prefer Danny Toledos method since that w... (by theraz)
std::ptr_fun explanation?
 
Here's a snippet of some code I have. // Check if the line starts with //, the program then ig...
[1 reply] : the isspace from cctype takes an int as parameter and returns an int. ... (by Bazzy)
Real Time
 
I created a program that displays simple mathematical questions. (Ex. 1+1=?) Now, I want to make it...
[3 replies] Last: Well, you can do all sorts of stuff with the console with ncurses, inc... (by Athar)
glPushMatrix & glPopMatrix
 
In lame man's term, what do these exactly do. I kinda finding it hard to imagine at the moment despi...
[1 reply] : glMatrixMult(some_matrix); glPushMatrix(); glMatrixMultf(some_o... (by hamsterman)
user input to an integer array
 
Hi, I want to set a user-define integer array for the following calculation: e.g. ISBN: 7802...
[2 replies] Last: excuse me I am a newbie to C++. having only learnt a couple of lecture... (by kimkim0513)
Reading integers from file into array
 
So I'm trying to write a program that will read some integers from a text file, sort them, then writ...
[1 reply] : Have you tried to actually code reading the numbers from the file? Wha... (by Zhuge)
position
 
[13 replies] Last: int leninbytes=(char*)(numbers+SIZE)-(char*)numbers; int leninelems=... (by rocketboy9000)
by amedxy
how to rounding
 
I have a number a = 12.3456, I need to rounding. Setprecision function only shows the rounding on th...
[6 replies] Last: That doesn't work for negative numbers. (by rocketboy9000)
Looking for vowels, characters, etc. in a few strings
 
I have to write a program which outputs how many characters (letters+spaces), vowels, consonants, an...
[2 replies] Last: Oh, sorry. I guess im just tired because there are a few really care... (by apearson28)
February 2011 Pages: 1... 1415161718... 43
  Archived months: [jan2011] [mar2011]

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