General C++ Programming - September 2010 (Page 4)

a problem with initialization values of array
 
Hello everybody! Can you explain the different between these things? int a = {a = 1, a = 1}; int a = { = 1, = 1}; int a = {a = a = 1}; by ...
[12 replies] Last: @OP The answer to your question was in the second paragraph of the tu... (by Bazzy)
Why can't I do this (if statement)
 
it feels like the answer is obvious, which it probably it, but I really can't figure this one out. here's my code for(int count=0; count<50; cou...
[2 replies] Last: yeah i realised about 10 minutes after posting this :P rookie mistake.... (by the2kanman)
Appcrash on execution
 
Hello, thanks for taking the time to help. _System_ O/S: Windows 7 Home Premium 64 bit Compiler: minGW 5.1.6 IDE: Eclipse _Problem_ I'm experienci...
[5 replies] Last: It's a 2D engine. The hugeness comes from all the things that need to ... (by helios)
Error passing a vector of structure
 
#define X 0 #define Y 1 #define Z 2 struct GzVertex:public vector<GzReal> { GzVertex():vector<GzReal>(3, 0) {} GzVertex(GzReal x, GzReal y, GzReal z):v...
[6 replies] Last: yeah got it.. thank you all (by praween)
what is wrong with my array?
 
hi all okay so i have a string array that i declared in a header file and I'm trying to write to it but I keep getting this error, "no match for 'operator ' ...
[5 replies] Last: I solved it. thanks for your help everyone :) I had used the variable ... (by the2kanman)
by Null
XML library?
 
Hello, I'm looking for an easy way to edit an XML file. I don't want to write my own XML parser so where can I download a library that allows to edit XML files...
[1 reply] : http://xerces.apache.org/xerces-c/ (by sohguanh)
by SoD
Undefined reference error
 
I have the following class declared in a header file named calculation.h: namespace Calc { template <class T, class E, class Q> class Calculation { ...
[6 replies] Last: Q& add(); Q& sub(); Q& mul(); Q& div(); I return reference be... (by sohguanh)
LNK4098 - Simple Data Class
 
Ok, so i am creating a fairly simple data class for my own kind of font file system. What i want it to do is read data from a file and input that data into a cl...
[no replies]
if player reaches end of background(coordinates) show Mission Accomplished
 
Okay so what I am trying to do is in DirectX C++. basically I've got a character moving across the screen and a background that moves as you do(scrolls as playe...
[no replies]
by rconan
std::tr1::hash specialization for a private nested class...
 
I have a class similar to the following: // If I place the specialization here then Outer::Nested hasn't been defined. class Outer { public: ... priva...
[no replies]
How to isolate a nibble from a 16bit binary number
 
Hey all- I am a VERY beginner C++ programmer. A homework problem has me returning the shelf that a certain product is supposed to be on in a store. The shelf...
[8 replies] Last: @hamsterman: Yes, I realize that everything is done with binary. That'... (by jhchawk)
Simple class to main code error or so I think
 
I can not find an example in my teachers notes or any examples on this forum to help me with the problem with private members in a class. I know nothing can mes...
[9 replies] Last: Thanks. I redesigned what I wanted to do and solved my problem. (by Kajankow)
tic tac toe logic
 
I am creating a tic tac toe program for class. The kicker is that we have to use logic and arithmetic to solve whether the player has won.I am good on the colum...
[4 replies] Last: He stated that he cannot use hard-coded ifs, which is about the core o... (by Kyon)
by brac37
data member cannot be created
 
Hello all, I have a problem. I want some class B to create a data member of another class A. The default constructor of A is protected, so I take another con...
[7 replies] Last: The constructor of B is where the constructors of members of B are cho... (by brac37)
referance objects cause "no match for" kinds error
 
hello, while I was using msvc I could use a referance and actual object interchangably however when I switch to g++ 4x, I start getting no match for ... kind of...
[6 replies] Last: variable is not public, I did this "ptr = p.ptr " in copy constructor. (by afraidofdark)
recursion using queues
 
can someone here give me a super simple program code that implements recursion using queues? thanks in advance :)
[6 replies] Last: does it mean that i can't use queues? (by alihart)
boost::thread, pthread (valgrind/helgrind/drd)
 
Recently, I've been reading up on Butenhof's "Programming with POSIX threads" when I discovered the boost::thread library. I thought I would ask some advice fo...
[11 replies] Last: ok - getting valgrind/drd/helgrind to work was much more difficult tha... (by kfmfe04)
What would be the best way to create multiple entities like Pokemon?
 
I'm messing with classes and I'm wondering what would be a good way to create a list of monsters like Pokemon. I could have a Pokemon class and make them from ...
[11 replies] Last: Alright so I added a map: std::map<std::string, Pokemon> p_map; ... (by AdventWolf)
Trouble with SFML 1.6
 
I am using VC++ 2010 I can not get the most trivial programs to run. It always gives me the same error: http://img215.imageshack.us/img215/2116/capturezk.pn...
[1 reply] : I think you'll have more luck at the SFML forums. http://www.sfml-dev... (by R0mai)
#include "stdafx.h" and #include <iostream>
 
I want to ask that when we use "" and <> to cover the libraries files names? Is there any different?
[2 replies] Last: Don't use "New Console Project" in VC++. http://www.cplusplus.com/for... (by LB)
September 2010 Pages: 123456... 20
  Archived months: [aug2010] [oct2010]

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