General C++ Programming - July 2012 (Page 21)

by Okan
Dungeon Crawl Question
 
Make a program that outputs a simple grid based gameboard to the screen using either numbers or characters. i.e. . . . . . . . . . . . G . . . . . . . . ....
[1 reply] : create a 2d array: char map = //5x 5grid {{ 0 , 0, 0 , 0 ,0 } , {... (by Jikax)
A question about deque::clear() (1,2)
 
std::deque<int *> myList; for(int i=0; i<100; i++) { myList.push_back(new int ); } myList.clear(); For clear(), the reference said "All the elements i...
[20 replies] Last: I still wonder what char *s = new char ; means. (by Catfish2)
Multiple inheritance and virtual functions
 
Hello everybody, I have a strange problem (which could possibly be really simple to solve). I need some help with the background theory of C++. This is my pr...
[1 reply] : It probably places Driver data at the beginning of Tester so when you ... (by Peter87)
by ToniAz
Pausing in C
 
How were programs paused in C back when there were no streams, obviously not by system("pause"); or system("cls"); :D I am curious to know, as I am using C...
[4 replies] Last: There is an article on this site, which describes all the options for ... (by TheIdeasMan)
Designing a Library (Diagrams and Helper functions)
 
I'm in the process of designing my own multi-purpose library with its focus to be mostly on rendering much like ogre although I have enough knowledge to impleme...
[3 replies] Last: ok (by DeXecipher)
by Tresky
Exceptions
 
Hey guys, I'm trying to figure out how to use exceptions, but I don't get it. Here is something I have in the constructor of one of my classes. Does this even ...
[1 reply] : Hey, u'r missing 'try' and 'catch' blocks if u want to use exception h... (by soranz)
by soranz
Tricky sorting algorithm
 
Hi ! This has been causing me a lot of hardship to find a reasonably elegant solution. I have an array of ints that I want to sort. Conditions are: 0-Do not...
[no replies]
stopThread(ms) after some work in thread
 
Hello All... I want to know some information about thread , and how does it work if i use it like following... class DoWork: public Thread, public Timer { ru...
[6 replies] Last: Yes i understand what you are trying to say. In my scenario Inside th... (by cpathrd)
Heterogenous link list
 
does anybody know about heterogenous link list ? how we could implement ?
[4 replies] Last: ok Thank you for help.. (by HiteshVaghani1)
Calculator Program
 
I have a c++ book that has given me some code for input and execution for a calculator program. I created a template class for Node and Stack operations for sto...
[6 replies] Last: If you're not after learning classes and data structure but rather aft... (by ToniAz)
copy constructor
 
Hi. I need a copy constructor that takes three arguments for class Customer. Please help with the code that produces such a constructor. This is my code: st...
[1 reply] : I need a copy constructor that takes three arguments for class Custom... (by Disch)
by b1gzz
Why cin.get(); and cin.ignore(); are not pausing in some programs
 
Why cin.get(); and cin.ignore(); are not pausing some of my programs?
[1 reply] : Probably because there are residual characters left in the input strea... (by shacktar)
declaring the size of int, double, floats
 
#include <iostream> using namespace std; int main() { int i; float x, y, z; double d; i = 15; d = 40; x = 25; y = 125; ...
[2 replies] Last: There is no such a standard fucntion that would report the number of d... (by vlad from moscow)
Issues with vectors and referrences
 
I have the following code: class Form { public: Form(): iSize(0), iSelection(0), vFormLabels(), vFormExampl...
[8 replies] Last: Thank you so much Peter. I don't understand why I have such a hard tim... (by Volatile Pulse)
auto sort tetrahedron
 
Its very difficult to fill the vector array a way that all the outside-faces of the tetrahedron are rendered. That means, if your inside the tetrahedron, you...
[5 replies] Last: ok, i'll check it (by Marvin Wyss)
by Tresky
Works in Debug... Not in Release
 
As the title suggests, I have run across an issue of something working in the Debug run when it runs with the IDE, but if I run the release version without the ...
[10 replies] Last: If you only need a pointer or a reference, then all you have to do is ... (by ModShop)
string question 2
 
string temp cin>> temp; cout << temp.length() <<endl; for(int i=0 ; i < temp.length() ; i++){ cout << temp <<endl; ...
[1 reply] : Use functiom std::getline instead of operator >>. (by vlad from moscow)
by mozi
array-like class
 
As we know in C/C++ we could initialize an array in this way: float a = {1,2,3,4,5}; so I am wondering how to define a class (for example, class Array) s...
[2 replies] Last: thanks, Athar. That solves the problem! (by mozi)
by Tresky
Overloading Operators
 
I hear everyone talking about overloading operators, but I don't quite understand. How is that helpful? How can I use that?
[5 replies] Last: I'm gonna bookmark this thread. Haha. Thanks. (by Tresky)
by dthkai
Precompiled headers?
 
Hi Everybody!! I'm using Visual Studio 2010, and I found myself on a weird trouble, see, I converted a project from an older version of visual studio to visual ...
[1 reply] : Go into the project settings; there should be an option to disable/ena... (by Zhuge)
July 2012 Pages: 1... 1920212223... 30
  Archived months: [jun2012] [aug2012]

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