Beginners - August 2013 (Page 28)

Book language
 
What coding language is Game Development Essentials in?
[4 replies] Last: post a sample of the code and we can tell you (by closed account Dy7SLyTq)
i have a question which is if i am using an integer but then i wrongly enter a character, how can i make the input?
 
#include <iostream> using namespace std; int main () { int num; cout<<"Enter a number:"; cin>>num; return 0; } when i enter "a" it will be popping out ...
[6 replies] Last: only chriscpp can run... others one cannot run... btw thank you... pro... (by cheng412)
Temperature 3q accepted as valid
 
Write your question here. The problem with the following code is that when the user enters a temperature such as 8q instead of 86 or 3q instead of 30, the prog...
[2 replies] Last: Thank you. (by david1229)
How to transfer variables from a 1d array to a 2d?
 
As topic asks, how do I transfer the varaibles located in my 1d array to a 2d array? Currently, my code does not seem to transfer the codes (either that or my c...
[3 replies] Last: On the second note: 1. Lets be at i==60, y==0, x=60. x!=61, so maze(0... (by keskiverto)
About write file and read file in C++
 
When I wrote codes below into my visual C++, and begin to run, there is no error and the console have nothing.Does the line "ofstream sals("salaries.txt");" me...
[1 reply] : Yes. "salaries.txt" should be an already existing file in the same di... (by kevinkjt2000)
by habbah
CO-OP Beginners Coding Project!
 
Intro: I find the best way for me to grasp a basic understanding of C++ is too learn small pieces and then manipulate what I learned. This also makes it a lot...
[12 replies] Last: If there is a room I would like to join. (by MatthewRock)
How do I print a 2D/ vector of vectors?
 
For example, if I was using a 2dimensional array, I would print it out like this: for(int i = 0; i<row; i++) { for(int j = 0; j<column; j++) { cout <<...
[3 replies] Last: Thank you, I'm new to 2d/ vector of vectors, so was getting myself con... (by asdfg2323)
Is this a memory leak? Dynamic_cast
 
I'm pretty bad with this stuff so I'd like to ask just for 100% safety: void function(Class* other){ if(SubClass* t = dynamic_cast<SubClass*>(other)){ ...
[2 replies] Last: If the destructor is virtual there will not be a memory leak (by vlad from moscow)
by matt11
Need Help how to create a makefile??
 
Hello everyone here is my question that im assigned. now i truly have looked into my text book and im not quite sure how to go about this. Create a makefile...
[1 reply] : As best as I can tell this may be what you need? CPP = gcc TMA1Questi... (by kevinkjt2000)
basic increment decrement operator!
 
i am not getting how this is working please explain it! this is showing answer 5 4 4 4...but how? PS-sorry for a C question! #include <stdio.h> #include <...
[18 replies] Last: [quote=hellcoder]" i am not getting how this is working please explain... (by closed account zb0S216C)
by Abdo2
Pointer
 
Can any one explain what pointer do in the code #include<iostream> using namespace std; int main( ) { int x ={2,3,4,5,6,7}; int *end=x+6; for(i...
[3 replies] Last: Thanks all (by Abdo2)
by keneth
When I enter a wrong input like a character it makes an error. How will I get rid of the error in my cin?
 
I'am beginner in C++.I have a problem with my program can somebody tell what will I do to stop the the error in the cin. When I input a wrong key like a letter ...
[8 replies] Last: NP, glad to help. (by closed account jwkNwA7f)
by Dee Mo
Hello World Trouble
 
Hi I am just trying c++ for the first time. I'm using Bjarne Stroustrups' book Programming: Principles and Practice Using C++. This is what he has in the book f...
[8 replies] Last: so problem solved lol ;) (by Chriscpp)
by elfeck
Default value: constructor array-parameter
 
Hello, is it possible to to something like that: class Mat2f { public: Mat2f(float matrix = {{0, 0}, {0, 0}}); }; I want to force a default argument of a...
[3 replies] Last: I did not check such code but maybe it is valid if your compiler suppo... (by vlad from moscow)
Unknown error
 
I'm working on a program to simulate an elevator, and to stop my elevator from going upt to floors with no people, I have it check if all the other floors have ...
[2 replies] Last: I did mean the comparison. Thank you very much. I'm just thinking of t... (by GrantPlusPlus)
How to use get() with arrays?
 
How do I use get() with arrays? I've looked at the article on the forums, but it isn't much help on what I want to do. I know I'm using get correctly, but the p...
[6 replies] Last: class std::basic_istream has (inherited) explicit conversion operator ... (by vlad from moscow)
Elevator Logic
 
I'm writting a program that would simulate the logic of an elevator. I was doing well, but then when I made some while loops to simulate the delays of the eleva...
[6 replies] Last: Ok, I will next time, thank you. (by GrantPlusPlus)
Arrays
 
Hi Im trying to create a game where ive got to create a 3 x 3 array and i've got to get the user to guess the numbers in the array (1-9) I think Ive got the ran...
[2 replies] Last: I dont know if you can help me but with line 61 im trying to get the u... (by cedwards)
2D Game programming... where to begin? (1,2)
 
Hi, I have some basic knowledge of c++(I've made a Siri like program and a prank virus(harmless) and some other basic MSDOS programs), but I don't have any expe...
[29 replies] Last: sorry... my mistake... i dont know why i thought it was the windows ve... (by closed account Dy7SLyTq)
New in Visual Basic C++
 
Hello all! I own a bit of experience in C++ PWN and now I decided to learn C++ in Visual Basic. Like most, I did my first "Hello World" with more few things. ...
[6 replies] Last: Before C++ there was C. Today C and C++ exist as two different but re... (by ManoelV)
August 2013 Pages: 1... 2627282930... 51
  Archived months: [jul2013] [sep2013]

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