General C++ Programming - August 2012 (Page 29)

How To Initialize static data members?
 
I'm getting another error when I try to compile. It's telling me I must initialize my static data member but when I try to do that it tells my only constants ma...
[5 replies] Last: god forbid if you need to think for yourself a little bit. (by closed account o1vk4iN6)
Error!
 
What is the error in this piece of code? vector< vector<int> > mat(5,5),crtLvl(25,2),nxtLvl(25,2); Error is : 28 expected constructor, destructor, or type co...
[1 reply] : Maybe it is the result that you neither specified nested nema as for e... (by vlad from moscow)
output of printf("%d %d %d",a++,a++,++a);
 
how can be the output of following code 7 6 8 int a=5; printf("%d %d %d",a++,a++,++a);
[3 replies] Last: What i have read in a book that order of evaluation of arguments of a ... (by aish sbg)
Annoying Error
 
So I keep getting a million unresolved external symbol errors when I try to compile my program, I'll post all my code and the errors. tower.h: #ifndef TOWER...
[2 replies] Last: Maybe you should define your class tower as abstract. In this case its... (by vlad from moscow)
need help in doing something
 
i'm just starting to understand c++ and i need to make an image of 321 using "*" this can anyone help me? thanks
[3 replies] Last: for (int i = 3; i > 0 ; i--){ switch(i){ case 1:... (by RonSalm)
convert (int) Dec to Bin
 
Hi, I working a converter from Dec to Bin (DEC) 5 == (0B101) must's: - writing Right to Left ( 0XF5 == 0B1111 0101 ) - compact as possible futu...
[3 replies] Last: Why not just print the bitset? #include <iostream> #include <bitset>... (by Cubbi)
Compile Error in Template - missing ;
 
Normally this would be a quick fix, but this is really becoming frustrating and I need a fresh pair of eyes. This builds fine in the DLL, but when the test a...
[1 reply] : I fixed this by not including Filter.h and using it's base class, chan... (by clanmjc)
My classes are talking to each other correctly
 
I have a class (WavPlayer) with a member function fillBuffer(). BUFFER WavPlayer::fillBuffer(){ returnedData = wavReader.CreateBuffer(); return retur...
[4 replies] Last: If you're not sure where and why it is called twice, set a breakpoint... (by clanmjc)
Round down a int number in c++
 
Hi, How can I round down an int number in c++? What I want to do is basically round down a number, for instance I know that the my numbers are always goin...
[3 replies] Last: You guys are awesome! Thanks a lot. I'm always amazed about how quick... (by fstigre)
getting type from lambda c++11
 
Hi all, Is there any way of creating a variable which type is the result of some lambda expression. something like this doesn't work: decltype( (){return 1;}(...
[5 replies] Last: Yes! The lambda is just a way of evluating a closure, and since you ar... (by viliml)
Help me wrap my head around pointers and iterators. (1,2,3)
 
As a lot of you have seen before, I have issues understanding pointers. They just don't click for me. I understand the concept of memory location, I understand ...
[43 replies] Last: thanks, didn't really think about it, but I guess its because I'm usin... (by Zephilinox)
loading xml file from memory (hard disk)
 
I need help regarding how we can load xml file from loacal file system in C++
[5 replies] Last: thanks for the help of all you guys.... I have managed to parse xml us... (by mnasiriqbal)
SFML, can't figure out how to store a texture in a class
 
I'm trying to get my player class to hold its texture and sprite, but in this test I'm just doing texture, and it isn't working, some code has been commented ou...
[1 reply] : pfft, so every other thread gets half a dozen of replies and my sad l... (by Zephilinox)
fatal error LNK1120: 3 unresolved externals
 
I am a beggenner attempting to actually write C++ program (writing a text based RPG), I'm stuck with a error "fatal error LNK1120: 3 unresolved externals" and ...
[2 replies] Last: The bigger problem here is that you don't understand how coding in C++... (by Moschops)
Arguements in throw
 
I have a doubt regarding the possible arguments in throw. As far I have read in Robert Lafore ,it gives only a basic idea about exceptions. I read that argume...
[1 reply] : throw can throw ANYTHING! It can be an exception class, a fundamental ... (by viliml)
Vector problem
 
Hi, i've been doing some programming for a while, and im using a C++ book that i've bought. But then i came to the "vector" part. i got stuck. In my book, it sa...
[5 replies] Last: Thank for everything! Jmadsen, you are those one of those guys who mak... (by jsheuirjfjekk)
by cniper
.exe file has stopped working windows trying to find solution
 
i am writing a program where i have to perform different operation using float arrays. here is my complete program: header file: //floatArray.h #ifndef FLOAT A...
[15 replies] Last: What does your whole program look like now? (by guestgulkan)
kbhit problem
 
HI i wrote a program that terminates when the Crtl-C is pressed however it doesn't work.Can someone help me? the following is my code #include <cstdlib> #...
[4 replies] Last: Ctrl+C is ascii 3, did you try that? (by ToniAz)
classes object oriented programming help
 
This program has a lot of errors how do I do it? The problem is to develop a billing system of a hostpital using a persontype base class There's the othe...
[1 reply] : To understand classes you need to understand encapsulation. The whole... (by Disch)
If Syntax error
 
I get two annoying if syntax errors when I try to compile my program. Here's the code that has the error void arrowtower::upgrade(const player &cplayer){ if ...
[1 reply] : player looks like a class name. cplayer is your object. so line 2 pro... (by Disch)
August 2012 Pages: 1... 2728293031
  Archived months: [jul2012] [sep2012]

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