General C++ Programming - October 2012 (Page 14)

Dynamic 2 Dimensional Array
 
Which is the correct way to create a Dynamic 2-Dimensional array? int **2d() { int **array= new int * ; array =new int ; for(int i=0; i<10; i++) array =...
[3 replies] Last: from what I remember from it, the '4' might be unnecessary and may ca... (by Disch)
overloading [] problem
 
in my book, I saw a class named ArrayTp has this public function: virtual T & operator (int i); virtual T operator (int i )const; inside the each definition, ...
[8 replies] Last: I'm wonderign is this work ? No that will not work. since the func... (by Disch)
const setter.
 
I know, it sounds silly. It occured to me that I could abuse a class's own const methods to set it's own members. It's kind of appalling, but is does this actua...
[6 replies] Last: @Brandon Captain not quite the same. none of my pointers or variables... (by vlad from moscow)
by ravian
Hit The Character
 
Hi I am making a game in which characters will fall from the top. And the user is to press these characters before they touch the ground. I can throw them f...
[1 reply] : Can you post the source to get a better understanding of what we're lo... (by Callum5042)
Program Help - Read characters entered until a $ is entered
 
Hello, I wish to make a program that reads characters read from the keyboard, until a $ is entered. Here is my code so far: /* Write a program that rea...
[14 replies] Last: Now i see what your saying thank you ill try to be more aware of this ... (by gsizzle10)
by skarla
SDl
 
http://pastebin.com/wCsFp26Y Here is my source. The problem is that the checkcollision works good for the (player) but not with the heroe(the image.) So ...
[1 reply] : Please don't double post. http://www.cplusplus.com/forum/beginner/828... (by MrHutch)
Debuginfo Memoryallocating
 
Hello @all i got another question :). I am using Visual Studio 2008. Is there a possibility in the Debugger to recognize when a Funktion allocates Memory? T...
[1 reply] : what compiler are you using? Some will show assembly, and form ther... (by pogrady)
Printing out a tree
 
Hi, I would like to print out a tree with all nodes. For example, if the tree is: 6 / \ 2 9 / \ \ 1 3 10 ...
[3 replies] Last: Awesome that sounds simple enough ill give you some code and ill expla... (by gsizzle10)
no match for 'operator>>'
 
I'm trying to read in a number of rows and columns from the first line of a text file. They're the first two items in the file, and separated by spaces. Here a...
[3 replies] Last: operators are just shorthand for function calls. If there is no operat... (by Moschops)
Need Help With These Assignment Questions
 
question 1) Write a program which has a class which contains a member function which is capable of generating the list of 100 numbers made up of all 1’s and 0...
[1 reply] : What's the problem? (by kbw)
not running dev c++
 
i instal dev c++ but when i compile and run programme then it is not run it show this message couldn't process this .exe file. and when i write system("pause") ...
[no replies]
Can anyone tell me why this code is getting build errors, but Microsoft Visual won't highlight any problems?
 
[ Input "exams.dat" consist of... abcdefabcdefabcdefab 1234567 abcdefabcdefabcdefab 9876543 abddefbbbdefcbcdefac 5554446 abcdefabcdefabcdef 4445556 abcdefa...
[8 replies] Last: Doh, I copy/pasted the code into the wrong file and wasn't actually co... (by Disch)
i need some one check my solution in structure
 
Hello I need help in understanding this question And apply the solution properly The mistakes that you should avoid the next time //Write a program t...
[5 replies] Last: http://www.cplusplus.com/articles/Ny86b7Xj/ Next time please state wh... (by closed account owbkoG1T)
fibonnacci
 
hey guys first post i had a dillema in my code where i was not able to show the big integer of my sequnece after a certain number and was wondering what i co...
[1 reply] : post the main code,please. (by dangerous)
Help with Linked Lists - C++
 
I'm trying to build a banking program with the capability to create new accounts (savings or checking), process a deposit, process a withdrawal, or print one or...
[4 replies] Last: Are you using a generic std::list or implementing your own templated l... (by chase c)
by aj3423
boost::this_thread
 
void fn() { try { while(1) { this_thread::interruption_point();// Sleep(1); } } catch(...) {} } thr...
[6 replies] Last: here's my simple implementation:) #pragma once #include <windows.h> ... (by aj3423)
by gghf
Hi, quick question about displaying a value.
 
Hello, I need help displaying just the first digit of a number. I thought the code was setprecision but apparently that is just for decimals. For example I have...
[6 replies] Last: thanks (by gghf)
Creating a separate constructor
 
I have a class that inherits a class like so: // ParentClass.h template <typename T> Class ParentClass{ ParentClass(); virtual ~ParentClass; ... }...
[2 replies] Last: Post your exact error you get, is mainclass the same class as ParentCl... (by Need4Sleep)
Help with While statement
 
Hello, this is a program that was assigned for homework and i figured most of it out but cant figure out why program wont stop, its like stuck in an infinate lo...
[1 reply] : What you do is what you get. I have question to you why did you decide... (by vlad from moscow)
Help
 
I am trying to divide this code into classes. I am learning how to program and this is for my personal use. If anyone can help it will be greatly appreciated. ...
[8 replies] Last: Thank you again (by Binarydude87)
October 2012 Pages: 1... 1213141516... 50
  Archived months: [sep2012] [nov2012]

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