Beginners - August 2014 (Page 19)

by yepMe
Relation between "this" and "VPTR"
 
Hi Techgurus, I understand the meaning and functionalities of both of the in built pointers. THIS : it is a pointer automatically invoked in the member f...
[15 replies] Last: http://deepakgiri123.blogspot.fi/2011/05/c-up-casting-down-casting-in.... (by keskiverto)
question from job interview
 
Write your question here. void func() {int i; int *pint=new int(); Do things delete pint } what is the danger here? find 2 ways to solve the...
[16 replies] Last: this interview question is stupid and so open ended that any answer y... (by dhayden)
by Aceix
Configuring eclipse and cdt
 
Hi all, I just downloaded the latest available versions of eclipse luna(4.4.0) and cdt(4.8.0), but the parser keeps on underlining c++11 features as errors. I'...
[3 replies] Last: Ok, I've figured it out. Thank you, Aceix. (by Aceix)
by zdzero
Remote debugging with WinDbg over 1394 cable
 
I really don't get it. How can I make this work? On the host computer I opened a WinDbg with Administrator rights, went to File | Kernel Debug and in the 1394 ...
[no replies]
Object with a Constructor as a member of a class
 
Is it possible to have a member in a class of a type of a class that has a constructor? As in: class foo { foo(int value); }; class bar { fo...
[3 replies] Last: http://www.cplusplus.com/doc/tutorial/classes/#member_initialization (by Peter87)
by T4l0n
input and sort array
 
I wanted to make a program where i input the number of elements in the array, input the elements value, and the program outputs all the elements in crescent ord...
[2 replies] Last: A simpler one: #include <iostream> #include <array> #include <algori... (by Aceix)
by Ch1156
ifstream not working in program
 
I dont knwo whats going on here, this ifstream is not working at all, its this one: Line 40: ifstream getMap(directory.append(mapName)); #include <iostream> ...
[2 replies] Last: Ah I forgot about that, I had it set in my other project but I started... (by Ch1156)
name spaces
 
Write your question here. Hey guys, I am trying to write the value entered on line 7 to the integer under the name space "example" 1. Is this possible...
[5 replies] Last: @OP To give pers a value, it can be done this way: example::pers=5; ... (by Aceix)
by Ch1156
Can you please explain some of this code to me
 
Ok So i'm learning SFML and I learned how to make a program that gets a grid from a text document and puts graphics from a sprite sheet on it, but there are som...
[6 replies] Last: You find() on line 7, so repeating the search on line 12 is unnecessar... (by keskiverto)
by mehak
this pointer
 
the output of the following program is 10 0 whereas according to me the output should be 10 20 because obj.setX(10) returns a pointer to the current object ,tha...
[3 replies] Last: obj1.setX(10).setY(20); When evaluating the above: First get obj1 ... (by closed account z05DSL3A)
by Ch1156
Cant pass ifstream
 
I'm trying to pass ifstream by reference to a function but it's nt working for this last one: #include <iostream> #include <string> #include <vector> #...
[3 replies] Last: Nevermind I forgot the & in the main game part -_- I could have sworn ... (by Ch1156)
Operator Overloading
 
Hi! I made a class "vec2f" and i was trying to overload its operands. According to what a read, binary operands should be non-members functions. The problem ...
[8 replies] Last: Thanks helios! That's what I wanted! (by asus1575)
Restart confusion (1,2)
 
I am currently making a program that acts as a simple bowling score calculator, it allows for multiple players, each to be names and then shows the score frame ...
[31 replies] Last: Don't worry, I'm not made for software design, I'm struggling to make ... (by LiamSalt)
by mehak
size of empty class
 
why is the size of empty class non zero in c++?
[1 reply] : Because if it was zero bytes then there wouldn't be a class. You can s... (by Cody0023)
by yj1214
Help me!!
 
Ok, first of all, i'm newbie to computer languages. However few days ago, i started learning c++ and wondering how the heck games are made with c++, and i real...
[1 reply] : DirectX is a framework that encompasses various game-related libraries... (by helios)
Char* can refer to a string of characters?
 
I was curious on how a char* (variable name) can be set equal to a string of characters demonstrated in the following code line. char *pName = "John"; ...
[5 replies] Last: the << operator is overloaded to treat char pointers as if they point ... (by Disch)
Strings and Boolean
 
G'day guys, I am currently at work and have some time to kill so i thought I would ask a question about strings and booleans I was going to try out when I g...
[2 replies] Last: ah right thanks, so if I use one of the above I can then later use; ... (by Ryanhuddo)
by Ch1156
SFML collision help (1,2)
 
Ok so I am trying to set up a collision object with a player sprite and a red box sprite but I cant seem to get it working, i'm not really sure what exactly to ...
[27 replies] Last: Alright, I still didnt get it XD but i'm working on other stuff like p... (by Ch1156)
by mehak
referenes and pointers
 
what happens when we try to access the value at a NULL pointer position as in the following program #include<iostream> using namespace std; int main()...
[1 reply] : You are basically de-referencing a null pointer, which will result in ... (by Smac89)
Vector error (does not name a type)
 
Ok, I entered the code as it was in the textbook I'm reading, but the compiler is giving me an error on the 2nd-4th line from the code below, saying 'v' does no...
[4 replies] Last: Thank you. The book never pointed that out and I never even thought o... (by Ascendant78)
August 2014 Pages: 1... 1718192021... 40
  Archived months: [jul2014] [sep2014]

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