Beginners - December 2012 (Page 11)

Overloaded addressof operator?
 
say i have the following wrapper class Class CHandle { public: .. .. private: HANDLE m_h; }; how would i make an overloaded operator that will re...
[3 replies] Last: Also to inherit from HANDLE class CHandle : HANDLE {}; //... ReadFi... (by Lowest0ne)
why dont this simple ass sdl code work?
 
it runs but it doesnt show any images!! SDL_Surface *screen = NULL; //SDL_Surface *leftclips = NULL; //SDL_Surface *rightclips = NULL; int SCREEN_WIDTH...
[7 replies] Last: yep :D (by devonrevenge)
by klawy
String to char array
 
Hi everyone, I am to write a simple game that reads a labyrinth from a txt file and there are some issues concerning the conversion from the string to array ...
[2 replies] Last: Ok, so I did what you recommended: int i=0; while(getline( file, li... (by klawy)
Sorting
 
hi, I have been trying to sort the elements in ascending order. But I am kind of stuck at the switching part. Don't know how to continue from there. This ...
[16 replies] Last: wow ok, i think i kind of understand. But there is still this small b... (by Anonymous101)
copy and paste step by step
 
hello everyone. could you help write me a program please.. I know next to nothing about C++ I want a program which can copy step by step then paste step by ste...
[18 replies] Last: I see. thank you (by Vanda015)
by WaaaaW
Fixing a possibly poorly initialized data member
 
Hi, I'm relatively new to C++. I wrote up a short program that uses the SFML library (the problem seems to be unrelated to it, though), but it doesn't act as in...
[10 replies] Last: I made GameManager a class because I would like for it to ultimately ... (by cire)
by Rixxa
C - Problem with lvalue
 
Hello, I have problem with lvalue please someone help me :) I put stars where the lvalue problem is. THANKS. for(i=0;i<99;i++) { if(users .ID==0) bre...
[1 reply] : i solved my problem using strcpy ;) (by Rixxa)
Help with greatest common factor program
 
I want a function to do something, but then I also want it to print what it was doing. I want it to find the greatest common factors of two numbers using if ...
[3 replies] Last: int gcd(int a,int b){ std::cout <<a<<" % "<<b<<" = "<<a%b<<std::... (by helios)
War Card Game
 
I am new at programming and have been struggling for days on creating this program. I have to basically create the game of war. I have to create 2 arrays... pla...
[1 reply] : Well, here is something I came up with. Just a crude form but I hope i... (by closed account 18hRX9L8)
linker issues
 
I'm getting this error: 1>pokemon 2.obj : error LNK2028: unresolved token (0A00034D) "void __cdecl stats(void)" (?stats@@$$FYAXXZ) referenced in function "int ...
[3 replies] Last: It's alive, thanks for the help. (by continuumspooky)
Random Phrase Generator Issues
 
I'm having trouble understanding whats going wrong here. Instead of outputting one random phrase, like it seems it should, my program outputs all four of them. ...
[2 replies] Last: Consider using a look up table instead of multiple if statements. s... (by JLBorges)
How do i pass an array of allocated types into functions?
 
Hey man, i cant seem to figure out how to pass an array of allocated types. Right now i have tried to use some polymorphism like this: character = baseclass...
[4 replies] Last: @Assassinbeast and i also tried this decleration as you suggested: v... (by vlad from moscow)
Deep copy or Reference in map?
 
Hello everyone, I am a bit confused of this: map<string,XMLDocument> docs; XMLDocument doc; if (doc.LoadFile(ent->d_name) != XML_SUCCESS...
[1 reply] : It's a copy. Whether or not it's a deep copy depends on the implement... (by Disch)
by osw091
Problem with user input?
 
Hey, I'm very new to c++ and programming in general, so apologies if the answer is obvious. I decided to make a micro text-rpg to familiarise myself with the sy...
[7 replies] Last: Okay thanks for all the help guys, I used most of the fixes listed her... (by osw091)
Function Prototypes
 
I'm learning about function prototypes and was given this example code. #include <iostream> int add(int x, int y); // forward declaration of add() using...
[6 replies] Last: @ Xecutive That's more or less right, but a bit oversimplified. It ca... (by Chervil)
by Bob90
Declare char and if statements
 
Hi cplusplus folks i am really new to c++, i have only been learning it for about a week and i am using stroustrups programming book. and now ive come across a ...
[6 replies] Last: Whether to initialize variables when they're declared depends on a co... (by Bob90)
how to make c++ talk
 
Its hard to explain but for example i input "hello" and it actually says that aloud. similar to the say command in osx terminal.
[4 replies] Last: There are also open source alternatives (see below) A problem I enco... (by andywestken)
Mouse on Console Screen
 
I wanna to use mouse on console screen , but still i failed to find a little bit knowledge about it (How to use it...),Please help me & guide me about it...... ...
[no replies]
Changing Variable Value Without Input
 
Hey Guys, This is my first post here at cplusplus.com! I'm a newbie in C++ so I don't really know that much about the language. I just wanted to ask if I can ...
[4 replies] Last: musicindex and musicfileextenstion (I noticed that I spelled extension... (by donoskaro)
Is it possible to pass a reference to a reference?
 
In example: A GameState object has a reference to a RenderWindow object; GameState holds an object called Level, which ALSO holds a reference to a RenderWindow...
[5 replies] Last: A slightly ambiguous question? As I understand it, there's any proble... (by andywestken)
December 2012 Pages: 1... 910111213... 65
  Archived months: [nov2012] [jan2013]

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