General C++ Programming - February 2013 (Page 25)

Rect Constructor
 
Hi I am making a "Snake" game and I am creating a collider class which has a rect class which is used to work out collisions. The problem I am having is with th...
[3 replies] Last: You have not defined a Rect constructor with 4 int parameters. (by Peter87)
Optimizing bilinear interpolation?
 
I've made a function to do some bilinear interpolation on some rendered VGA memory (just an array GPU.emu_screenbuffer , each item is a pixel to be shown). /...
[no replies]
by stypex
Overriding of overloaded virtual member
 
I've got the following code with output. I can't figure out myself why it's what printed out there. I believe, it has something to deal with overloading/overrid...
[7 replies] Last: Thanks a lot. The last example by JLBorges settled the mess in my head (by stypex)
What does " *Pointer++ = '\0' " mean?
 
Hi all! I'm trying to figure out a code and I see in the source code : *hostpart++ = '\0' . What does it do? In the comment of the source code it says "Spl...
[4 replies] Last: Thanks a lot! I had some trouble understanding at first (I don't know ... (by Anthony973)
Simple Friendship Question
 
Which one is valid(or maybe just better to use)? class A{ friend class B; }; class B{ friend class A; }; Or class A{ friend class B; }; cl...
[no replies]
AVL **ptr corruption after rotation
 
I'm writing an AVL tree package, and keep running into an infinite loop where the root node's parent pointer points to itself. I'm running it with the simple...
[1 reply] : I added a TREE_NODE* return value for balance_tree to be assigned to *... (by wulfsdad)
IPC
 
Hi guys I have a situation where I have 2 programs. One program computes mathematical calculations and at one stage in those calculations it produces an arra...
[no replies]
error in c++ programm
 
what does ambiguous operators need parenthesis in funtion main() error mean in turbo c++
[4 replies] Last: thanks i know this but give me solid explanation for writing assighmen... (by qasim13985)
Explanation..
 
I am working on a project where i have to add /*..*/ and #ifndef...#endif to mach as open and close braces. I was told to take a look at the below code. I ...
[2 replies] Last: thanks it is a bit helpfull.. What do I use to locate more then one c... (by detroit)
by xsesx
getTotal Error for array
 
For some reason I cannot get this to run properly. It has something to do with the getTotal function apparently according to the error message. This is the e...
[4 replies] Last: Thanks! Solved. (by xsesx)
Deque<int> Questions
 
I have some code using some deque functions, but I can't interpret what it means: typedef deque<mpz_class> dqz; typedef unordered_set<string> HS; HS S; ...
[6 replies] Last: Your clarification answered all of them. Thank you. (by knowNothing)
Pointer incrementing using dynamic memory allocation
 
I am using a pair of pthreads that call a pair of functions for ping-pong dma data transfer that are used in a loop for data transfer from an acquisition board....
[1 reply] : void* threadFuncCompress2(int* count) { unsigned int PRF = 2000; // ... (by isrinc1)
by dv1575
I have a dynamic stack and I want to pop 5 student records and display them
 
I have a dynamic stack and I want to pop 5 student records and display them but I've come to a dead end... could anyone help me? Here's my code: #include ...
[1 reply] : You might find things work out better with a slightly different interf... (by cire)
practice test ans 7,6
 
I was working a practice test. Snippet of code gives answer of 7,6. Can't see it, i get 1,0 class test{ public: static int n; test() {n++;}; ...
[7 replies] Last: More precisely it would be said that whenever the default constructor ... (by vlad from moscow)
Error : const copy constructor invoking non const methods
 
I have modified the copy constructor as constant in order to fix the compilation error.Again the compiler throws an error,because calling a non-const method fr...
[2 replies] Last: Thank You! your solution fixes the problem (by dany2704)
by progga
Need of Assistance here.
 
can you give me a assist here? how can i make this vertical road to a horizontal road? Give me some hints on moving the Road. Here's the Link of the code(i can'...
[1 reply] : bump. (by progga)
help needed
 
i am currently doing a mini bank account system using visual studio...i need help on using the header files...the question requires to use 3 header files for ea...
[3 replies] Last: You put your class definition in the header file. This must contain... (by MikeyBoy)
OpenGl Preserve States (SFML)
 
So I did read what you guys suggested however it said also that it was memory intensive and I had a question... I also came across this: Window.pushGL...
[8 replies] Last: Everything else works though, could it be since maybe renderwindows ca... (by Pickle Gunner)
I'm confused
 
Within the statement obj1=obj2; obj1 will call the assignment operator function and obj2 will be passed as an argument to function. ► True ► False
[1 reply] : If obj1 is a user defined type then it is true. obj1 = obj2; is equi... (by vlad from moscow)
pointers structures and strings. what can i do with spaces
 
this is my program and i dont know what is the better strategy to display the output perfectly align with the title, when i input a long variable or short the v...
[1 reply] : It would be helpful if you could use code tags to properly format your... (by MikeyBoy)
February 2013 Pages: 1... 2324252627... 43
  Archived months: [jan2013] [mar2013]

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