- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 3
- Posts with Upvotes
- 3
- Upvoting Members
- 2
- Downvotes Received
- 2
- Posts with Downvotes
- 2
- Downvoting Members
- 1
15 Posted Topics
Hi everyone. My name is Zvjezdan Veselinovic and I am a student at Rasmussen College over in New Port Richey, Florida studying Game and Simulation Programming. For my student portfolio, I want to create a "tron-like"/ "snake-like" game called Colors and Explosions. I have so far arrow key movement. That …
I am making a mock financial aid account for a project and I wanted to know why my program is not working. Can anyone help me out?? After creating my class, I am trying to access my getName(student_name) function in my main(). It says: "error C2065: 'student_name' : undeclared identifier". …
I think your ptr needs to be *ptr for it to work. I am a noob at programming, but that is what I would try next.
Hi everyone! I wanted to ask you guys a question. I was referred to this website by a friend of mine and I synced this account with my Facebook. I am new to computer programming, but I understand the beginning basics of C++ (i.e. cin, cout, void, float, vector, functions, …
What are the ** used for? I'm new to coding so I am unfamiliar with that. Also, maybe in order to complete your class CPop, you need to put a semi-colon after the } on line 9. Sometimes that helps the program understand that there is no actual problem with …
I am trying to make a program where when I click an arrow key, the object moves constantly until I click another arrow key; or, when my object reaches a wall and crashes. For my code, I have made arrow key movements, I have assigned them in the program, and …
Also try this: #include <iostream> #include <cmath> using namespace std; void continue_() { char c; cout << "Press any key to end program: "; cin >> c; cout << endl; } int main() { float area, length, width; cout << "What is your length? "; cin >> length; cout << …
I use "Beginning C++ Through Game Programming, Third Edition" by Michael Dawson.
Do you mean this? string name; cout << "What is your name? "; cin >> name; cout << endl; // makes a space after you write your name cout << "Your name is: " << name << endl;
Couldn't you do it a different way? Like: vector<float> grades; float grade1, grade2, grade3; // and so on then make a question and do cin >> grade1; grades.push_back(grade1); and do that for all of your grades. Then just look in the middle spot cout << "Median = " << grades.at(1) …
Try using a vector like vector<float> my_grades; // float = number with decimals float grade1, grade2, grade3; then write your question like cout << "What is your first grade?; cin >> grade1; then push_back the cin like so: my_grades.push_back(grade1); when you do this for all of your grades, you can …
whenever you make any headers, you should link them together. Like: #include "header1.h" inside your second header. Then do #include "header2.h" inside your third header. Then do #include "header3.h" inside your main_program.cpp Does that make sense? Sometimes my explanations do not make sense, which is why I am asking if …
you have to do getline(cin,Input); ^^^^ this gets the spaces in the user's input so from there you can do your if(Input == "Pick Up Knife") { cout << "You got the knife" << endl; }
Can anyone help me with my program? I am making Tic-Tac-Toe and I am stuck. Here is all of my code that I have done so far.... . . . This is called design_of_board.h #include <iostream> #include <string> #include <Windows.h> #include <conio.h> #include <ctime> #include <vector> #include <algorithm> using namespace …
You cant just use gotoxy(num, anothernum); and increment or decrement them in the for(int i) loop??
The End.
zvjezdan.veselinovic