General C++ Programming - February 2016 (Page 21)

swapping members in array of structs
 
I want to swap two structs in an array of structs: I just can't figure out how to create a temp object to store one of the objects being overwritten: struct...
[11 replies] Last: The reason why this won't work val_3 = n_ptr .student_grade; is a mi... (by Chervil)
Setting up a linked list of free nodes
 
I was asked to allocate memory using "malloc", for example, malloc(1000). Then, I must divide these 1000 bytes in 10 blocks of 100 bytes. And, within each block...
[no replies]
reference in class
 
I have a class called "Graphics", the window(sf::RenderWindow) is created by myself. I want the Graphics class to change the window so I thought I could have...
[2 replies] Last: Thank you, didn't think of that! I'll use pointers instead ;) (by DynamArr)
const dynamic array
 
Hi mates ;) I am making a game and for the map I have a dynamic array: Tile ** Ground; I want the ground/map to be const so you simply just cant change the...
[2 replies] Last: Thank you very much, that worked ;) (by DynamArr)
Int to string
 
So I've got this: outtextxy(725,k,masini .nr); masini .nr is an integer. outtextxy is a graphics.h function. How do I convert it to a char? Help?
[3 replies] Last: I like this implementation using std::stringstream . http://www.cplus... (by integralfx)
virtual function being called instead of implementation
 
so i am making a chess board . non gui , just the logic. I have a mother class called piece , and the sub classes (rook ,queen...)which inherit from it. the ...
[7 replies] Last: You shouldn't mix relying on inheritance mechanisms and using member d... (by kbw)
February 2016 Pages: 1... 192021
  Archived months: [jan2016] [mar2016]

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