General C++ Programming - May 2013 (Page 30)

if and else statements
 
#include <iostream> int main() { using namespace std; cout << "Enter a Number"; double dX; cin >> dX; cout << "Enter another Number"; ...
[4 replies] Last: Ah. Thank you so much :D (by zachattack242)
by JDscar
Any good tutorials on making a 2D game engine in C++?
 
Hello, Iv'e been wanting to make a game for some time now. I now a good amount of C++ and math concepts and I think I'm ready to start making one. I don't re...
[no replies]
by Elidor
Explicit conversion from string to class reference?
 
Hello I'm a little bit confused on the following code that I'm reading out of the book "The C++ Standard Library". class C { public: explicit C(co...
[4 replies] Last: In this code snip std::vector<std::string> vs; for (const C & elem : ... (by vlad from moscow)
Need help eliminating errors from this program
 
I have written a menu driven program that has file handling in it. It shows particular error with file handing. I have declared an object 'f' of fstream class b...
[1 reply] : You should either use nested name with namespace std as for example ... (by vlad from moscow)
Pathfinding help
 
I am currently trying to implement a pathfinding algorithm using c++ and opengl. My code so far is shown below, could someone please help me figure out how to m...
[2 replies] Last: pathFinding is a hard and complicated topic. I modified an A* algorit... (by Bourgond Aries)
pls Make me understand with this question.
 
i am starting to study c++. just know only basic c++. this is the question i need to understand how to do.. for time being,, my lecturerr didnt teach me about h...
[6 replies] Last: good job.. but i think ,, no need " sum1 " if (n % 2 == 1) { ... (by junkz)
by catus
Help with a little function
 
Hi all! i'm new on this forum and quiete new to programming xD i've create this piece of program: for ( int i = 0 ; i < 4 ; i++ ) { hold = rand()%9 + 1; ...
[11 replies] Last: @Bourgond Aries, Yes, you are right about the header files. Thanks fo... (by CroCo)
while loop keeps asking for input after EOF
 
This is driving me nuts! This is an example from C++ Primer on while loops shortened for simplicity: int main() { int value = 0; while(cin >> ...
[10 replies] Last: Yeah, Bjarne's book has an example like that too, but you have to do C... (by BHX)
Error: glibc detected *** ./a.out: malloc(): memory corruption (fast): 0x08c06058
 
I would appreciate help. I am recieving this error: *** glibc detected *** ./a.out: malloc(): memory corruption (fast): 0x08c06058 *** ======= Backtrace: ====...
[1 reply] : The error is usually due to dereferencing items that do not exists. Fo... (by keskiverto)
.h --> N/A
 
I have a old version of c++ and the scrips i use need... Ex: #include <iostream.h> //but i want the new and better one: #include <iostream> Any ...
[1 reply] : Get a newer compiler. (by AbstractionAnon)
What Am I Doing rong
 
#include <stdio.h> #include <stdlib.h> #include <windows.h> #include <conio.h> #include <time.h> void draw(char main , int score); void reset(char ...
[1 reply] : Line 82. Of course it doesn't reset the apples. That statement doesn... (by AbstractionAnon)
Newbie Game Programming
 
Could anybody please get me started in the complex field of game programming? I have made text adventures and all that stuff, but I'm looking for graphical game...
[5 replies] Last: its not tru it is not the hardest... He Probably wants to make a fps g... (by closed account jyU4izwU)
by pcej
LNK 2019 problem
 
I'm trying to implement Vector with templates but, I've got a problem with linker. What did I wrong ? Does anybody can see some mistakes? I enclose all of my i...
[3 replies] Last: Sorry for being so unclear. What I meant was to put the definitions in... (by Bourgond Aries)
Effective Transformation Matrix Class Implementation
 
I want to make an effective useful matrix class to use for 3D transformation of points. Not it isn't intended to be used for linear systems or other uses for ma...
[no replies]
need help plzz !!
 
the question is as follows: Using a switch statement and functions implement the following game. The player's score starts at 0. Your program should allow th...
[2 replies] Last: char sentence can hold just one character, not entire meaningfull se... (by JockX)
template. what means typename MyList<MyType>::Node* MyList<MyType>::find(int ind)
 
#ifndef LIST_H #define LIST_H template <typename MyType> class MyList { private: struct Node { MyType item; Node* next; }; private: Node...
[1 reply] : http://www.cplusplus.com/articles/z13hAqkS/ (by Bourgond Aries)
Ending a thread
 
I have the following code : While (condition) { if (condition) { thread t1(FuncName, parameters); t1.detach(); } if (condition) { * something * ...
[1 reply] : While (condition) { std::unique_ptr<std::thread> thr; if (conditio... (by Bourgond Aries)
Dictionary Program
 
The program I'm trying to write is simple. The user enters a word and if it is the "dictionary" text file it says so. If not it outputs the two closest words on...
[6 replies] Last: so I think I'm getting closer... I have this now. It quits if i say qu... (by PoolOfDeath)
NCurses (PDCurses) Zombies game
 
I found the source code for a small game here: http://pastie.org/3001157 The code didn't work for me - it displayed "You lost" right away after the main menu. ...
[no replies]
Strided memory access
 
Hi... why is it said that using a loop as one below is bad in terms of performance ? for(i = 0; i < N; i+=M) { //some code } where M is any number >...
[1 reply] : I don't see why would it have bad performance. (by zoran404)
May 2013 Pages: 1... 2829303132... 47
  Archived months: [apr2013] [jun2013]

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