No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
24 Posted Topics
Re: I'm really in to C++ now, and just started making a text based game. I want to buy a book, but I'm not sure which one I should buy. I'm up to about part 40 in [url=http://www.youtube.com/watch?v=tvC1WCdV1XU]this[/url] series of tutorials. What would you recommend? | |
Input the minutes, then the seconds, and it will do the rest. Pretty simple but I just thought I'd post it. Made as a quick test for my game. | |
I just started looking at the basics of openGL, but I keep getting error LNK2019 and I don't know what's causing it or how to fix it. #include "stdafx.h" #include <cstdlib> #include <GLTools.h> #include <GLShaderManager.h> //Include OpenGL header files, so that we can use OpenGL #ifdef __APPLE__ #include <OpenGL/OpenGL.h> #include … | |
I want to start learning OpenGL. Codeblocks decided to break, so I downloaded Dev-C++ instead. I've tried loads of different websites to try and figure out how to install it, and I get some type of error every time. How should I install it with dev-c++? | |
Hi, I want to start learning OpenGL. I have searched for some tutorials and here is what I have done: 1. I downloaded the latest version of GLUT 2. I put the DLLs in C:\Windows\System32 3. I put the libs in C:\Program Files (x86)\CodeBlocks\MinGW\lib 4. Put glut.h in C:\Program Files … | |
Hi, I'm making a console application, text based game, and what I need to do is be able to do more than one thing at the same time. For example, I need to be able to make a timer that runs constantly, whilst the game is being played. I also … | |
I've been getting an error that says a class isn't declared when I try to pass it to a function. I got this error before, so I deleted the code and typed it out again and it worked. It's not working this time. The program starts in main, then goes … | |
I just made one, however after a short time or after a click, it just breaks and an image of the window appears within the window, and that image starts jumping around within the window, but the actual window stays where it is. I have no idea why this is … | |
I just decided that I wanted to make one with C++, but I'm not really sure what I should put in it. Any ideas? I don't just want it to be some boring thing where you have to "Press enter to continue" all the time. | |
I've never had a problem with files before, but now I can't seem to get it to work properly. I have this code: [CODE] fstream someFile("file.txt"); switch(choice){ case 1: cout << "Enter date: "; cin >> date2; cout << "Month: "; cin >> month2; cout << "Year: "; cin >> … | |
What I want to do is read a whole paragraph of text from a custom file. How would I do this without doing something silly like this? [CODE]while(someFile >> word1 >> word2 >> word3){ //etc. }[/CODE] I need to be able to read 3 numbers for todays date, then read … | |
How do I create a message box that lets me display a variable? I also need to know how to display variables with text. Here is the code in the switch(message) statement that I have at the moment that doesn't work. [CODE] case WM_CREATE: CreateWindow( TEXT("button"), TEXT("Click"), WS_VISIBLE | WS_CHILD … | |
Re: You made a ton of spelling errors and you missed a semicolon. | |
Is it possible? How do I do it? I need a function to return the players name, so I have this as the prototype: [code]string getPlayerName();[/code] And this as the function: [code]string mainFunctions::getPlayerName(){ return playerName; } [/code] But I get an error saying that the function called 'string' doesn't have … | |
Re: Come up with a game idea and write the code for it in C++. That's what I'm doing right now. I know that seems kind of trollish, but that's basically it. Spend as much time as you need coming up with an idea (the game that I am making now … | |
I've managed to use classes in separate files before, but I can't seem to get it to work here. I was just programming some very basic classes for a simple game I wanted to make. Here is the main.cpp file: [code]#include <iostream> #include "energySystem.h" #include "healthSystem.h" #include "intelligenceSystem.h" using namespace … | |
[code]#include <direct.h> int main(){ mkdir("C:\\Program Files\\Bacon"); }[/code] Creates a folder in the folder that the .exe file is in, and is called "Program FilesBacon". I think it's obvious what I wanted it to do. Help please? I'm using codeblocks if it matters. | |
Hello, I just downloaded the [url=https://mattmccutchen.net/bigint/]big integer library[/url], and I want to use it in my prime number checking program. I downloaded the zip file and got a bunch of .cc and .hh files. I need to know what to do with the files, where I should put them, and … | |
I just watched this tutorial: [url]http://www.youtube.com/watch?v=NTip15BHVZc[/url] and tried it myself, but I could not get it to work, I get these errors: [CODE]||=== 15. Placing classes in separate files, Debug ===| C:\Program Files (x86)\CodeBlocks\programs\tutorials\15. Placing classes in separate files\src\testClassFile.cpp|1|error: testClassFile.h: No such file or directory| C:\Program Files (x86)\CodeBlocks\programs\tutorials\15. Placing classes … | |
Just tried to make a quick prime number checker: [CODE]#include <iostream> #include <cmath> using namespace std; void askForNumber(); bool checkPrime(); void printPrime(); void printNotPrime(); int numberEntered; int x = 2; bool isPrime = true; int main(){ askForNumber(); if(checkPrime(numberEntered) == true){ printPrime(); } else{ printNotPrime(); } return 0; } void askForNumber(){ … | |
Hi, this is my first attempt at actually making a game that is actually playable, instead of something boring that is just the same thing over and over. The problem that I am having is that when the function startGame(); is called, the program closes. There are no errors, because … | |
I want it to list prime numbers from 1 to 100 like this: 1. 1 2. 2 3. 3 4. 5 5. 7 etc. [CODE]#include <iostream> using namespace std; int main(){ int num = 1; double number = 1; double div = 1; bool prime = true; int top = … | |
Re: This is how I made it. [code]#include <iostream> using namespace std; int main(){ int score; cout << "Enter score: "; cin >> score; if(score > 100){ cout << "Lies."; } else if (score >= 85){ cout << "A"; } else if (score >= 75){ cout << "B"; } else if … | |
Hellochina, I rarely use C++ but yesterday I came up with an idea for a program. What I want to happen is for the program to take a string, and for every letter, replace it with something else (for example, the letter after, or the number of the letter in … |
The End.