General C++ Programming - March 2010 (Page 15)

what, if anything, is missing?
 
Hi, I have the headers to a binary tree and it's node class. These headers are not mine but they appear to be missing some methods. It could be nothing but i'd ...
[no replies]
by mar11
set container
 
Hi all, let us consider this example on cplusplus // set::begin/end #include <iostream> #include <set> using namespace std; int main () { i...
[5 replies] Last: That's convoluted. (by jsmith)
by Bezi
Compiling a source file
 
If I have a header file "test.h" and a corresponding source file "test.cpp", what are the steps I should follow so that I can construct a personal library out o...
[no replies]
fatal error LNK1561: entry point must be defined
 
Hello, I have this error with Visual C++ 2008 express edition. fatal error LNK1561: entry point must be defined I'm writing an openGL program using SDL. Add...
[3 replies] Last: The SDL headers #define main as SDL_main. Ostensibly, so that a differ... (by helios)
Segmentation Fault. Why I don't know.
 
This program crashes as soon as it hits the line below(please search for the word "CRASH" to see the line). I cant find out why. Please help I am stuck. Than...
[4 replies] Last: The "Log" statement is our way of logging error messages to a central ... (by kgeorgie1)
Undifined behavior or something else?
 
What will printed to console, VS2008 prints 0. why, is it correct? because i read that: 4.9 Floating-integral conversions An rvalue of a floating point type c...
[1 reply] : I would image that it will print 0 because: char value ranges 0 (bina... (by chris)
How to read character strings
 
Can someone show me how to do the following? I do not have the slightest clue Part C - Reading character strings Declare a character string variable that w...
[1 reply] : How much code have you written ? (by bluecoder)
How do i get this C++ source code to display an actual total?
 
#include <iostream> #include <iomanip> #include <cmath> using namespace std; int main () { //displays rate info cout << "The Fast Freight Shipping Co...
[1 reply] : total of what ? what exectly do you want to achive ? (by bluecoder)
pointer to derived class query
 
Hey All, I'm quite new to C++ and I have a query regarding pointers and derived class objects say I have the following code: class animal { private: s...
[3 replies] Last: Thanks for your replies guys. It really helped me. I'm just trying to ... (by lazybones1987)
changing variable within loop - so this is not possible?
 
hi is anyone able to help me on this? for example if i have code like this #include <iostream> #include <string> using namespace std; int main() {...
[14 replies] Last: I found a way to solve my probelm. Thank you all who helped me :) For... (by whoami32)
Keyboard
 
I have to write a C++ program that reads in 10 numbers from the keyboard and then add them together. Then, finally prints its total. Can someone do this for ...
[10 replies] Last: Can someone do this for me? Hm. They're not even trying anymore, are ... (by helios)
How To Use C++?
 
I'm sorry, this is a dumb question but... I'm attempting to learn C++ language & I'm not sure where to use the programs I learn to write. Is there a program...
[2 replies] Last: If you're doing a lot of programming with Windows then Visual Studios ... (by Dudester)
How to watch static variable in function? (in VC6 debug mode)
 
This is my code: # include <stdio.h> # include <string.h> # include <ctype.h> // --------------- # define TOKEN_LENGTH 50 enum TokenType { UNRECOGN...
[7 replies] Last: Oh... I found the problem. static NextToken nextToken ; // nextT... (by Robertsong)
by jt1991
FORMULA!!!!!!!
 
ok, not really want u to help me do my homework, just want to know the formula... the program prompt user to input 2 point x1,x2 ,y1,y2... formula given sqr...
[7 replies] Last: ok i think i try to call it out... thanks though (by jt1991)
how to skip an input value?
 
I have a simple code, written below. I wish to skip/or not interested to enter the value of "a" at command prompt, how should I do this. #include <iostream> ...
[4 replies] Last: The solution suggested by maikel is perfectly well. It works exactly a... (by serge)
can anyone assist me with fixing these errors on a simple C++ assignment?
 
The following is the assignment Shipping Charges The Fast Freight Shipping Company charges the following rates: Weight of package (in kilograms) Rate P...
[1 reply] : Ok. The code is a little messed up, so seems to me. Did you lose th... (by maikel)
Ostream operator overloading
 
Trying to write my own complex number class, when I overload the << operator as below, it compiles fine when I don't try to use the << operator, but when I try ...
[4 replies] Last: Wow stupid mistake, thanks. (by tonyg362)
Class Errors
 
Hello Everyone! I am having some problems with declaring a class and am getting many errors. Here is my problem: I must write a program that enables t...
[6 replies] Last: Thanks for all the help Maikel! (by ohsnap1319)
by ramsci
gprof question
 
Hi experts, I need to gprof a library in our system to examine the function calls and see if we can optimize it any more. Basically, what I have is Execu...
[no replies]
New vs opeator new
 
A common interview question: Explain the difference between new and operator new. I have googled, but could not find any real satisfying explanations. Can so...
[7 replies] Last: Mixing new/delete and malloc/free is generally a bad idea. (by tummychow)
March 2010 Pages: 1... 1314151617... 23
  Archived months: [feb2010] [apr2010]

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