Beginners - May 2015 (Page 9)

Need help with Roomba
 
Please help friends! I have been stuck for a couple hours getting all of the templates and classes ready. I am stuck trying to get the program structure to even...
[no replies]
Error: sortLastNames was not declared in this scope.
 
Hi there, I have to create a class named book which will read from a file containing the book info and store them into a book array. one of the tasks is to sort...
[9 replies] Last: it worked. I used the mutator functions as you said, but the array did... (by mirahmed39)
i need that answer dear
 
Creat a class by the name student with attribtes.id.name.markes().and gpa In addition it should contain fuction set name() get name set gpa() accept markes Ca...
[1 reply] : Please note that this is not a homework site. We won't do your homewor... (by keskiverto)
by KickAz
Giving a name inside the program to our text file using OFSTREAM ?
 
So, this way, when I execute the program the file has to be example.txt But what I want to see if it's possible to be done is write the name of that file insid...
[10 replies] Last: Thank you very much! I was doing it without the .c_str() part (by KickAz)
Why are my if statements not executing correctly?
 
When I run this program, the if statements are not executing correctly. For example, if I enter 2 exemptions claimed, 78000 for adjusted gross income, and fili...
[1 reply] : You have a semi colon at the end of the if on line 110. (by shadowmouse)
hangman- game doesnt stop with correct answer
 
Hangman game, objective programming. The game doesn't stop even if the answer is correct ("while" loop works until guesses number reach maximum). In the beginn...
[1 reply] : It's a bit hard to read the code because I don't understand the langua... (by Peter87)
Should AI movement/logic happen during input or update?
 
So for the most part you have 3 parts to a game's main loop, right? One that does input, one that does updates, and one that finally drawls things on the screen...
[3 replies] Last: Honestly, your AI can go anywhere, but one thing that I've learned in ... (by ultifinitus)
Problem retrieving vector elements from another class
 
Hello everyone. I have a class where I create a vector of class objects in a class, I created a public getter function like this in Class A.cpp (this clas...
[5 replies] Last: I solved. I created a instance from Class A in the main and call the ... (by TheCatintheHat)
Give parent class a pointer to an object for all child classes?
 
I need every game object to have a pointer to my render window, but I want to do it in the base class so I don't have to keep doing it in every child class. An...
[1 reply] : assign it in the constructor in the base class? class GameObject { p... (by Gamer2015)
using "system()" is bad ?
 
I am not a beginner in C++ anymore, but I am not also that good at it. but I have seen dudes and guys saying not to use the system(). Why ?
[3 replies] Last: The system() is a standard C function. Platform independent. Yeah, t... (by Gamer2015)
by kunz
Arrays
 
Write your question here. int sandwitch_type; cout << "\tTypes of Sandwitch Available:\n" << endl; cout << "\t~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~...
[2 replies] Last: The simplest solution to use would be a struct. http://www.cplusplus.c... (by andywestken)
class inside a class?
 
I'm trying to write a class definition inside another class definition but I'm having some trouble. It's easy when putting them all in the same file but when...
[3 replies] Last: Thanks coder, got it now. (by dominover)
Process Name not Outputed?
 
I appear to be having a strange problem, when I run the program, nothing gets outputed, could someone possibly help with this error? #include <iostream> ...
[no replies]
Process Problem?
 
I appear to be having a problem due to the last function. It is mainly about the pe32.th32ProcessId type. #include <iostream> #include <windows.h> #in...
[1 reply] : I was able to fix it, just a problem with a curly brace messed it up e... (by icemewtwo64)
Help with C Xor encrypting
 
All I know that is Im suppose to turn both keys and the string into raw data and xor them The return of unhex is the same for some reason for string and h...
[1 reply] : so i changed my unhex function I still have problem my string is not a... (by maximumcapacity)
Clear 'ENTER'
 
So, I have this on my code: cout << "Push 'ENTER' to continue"; while (GetAsyncKeyState(VK_RETURN) & 0x8000) {} // if enter is already presse...
[8 replies] Last: You are correct: GetAsyncKeyState() does not modify the input buffer. ... (by Duthomhas)
Where does Visual Studio 2015 look for header files?
 
Where should one put the header file so that visual studio automatically finds it when I open the project? I put in the same folder as source.cpp and it failed ...
[3 replies] Last: I put all headers in a folder under Projects-> ConsoleApplication, doe... (by LayMuon)
quotient
 
There is no quotient function for two double-s? remquo doesn't round to nearest zero. I have to use fmod in indirect way.
[2 replies] Last: No, but you can write your own easily enough: inline double iquotie... (by Duthomhas)
by Crogn
looping objects?
 
any reason why I cant do this? #include<iostream> #include<string> using namespace std; class ball{ public: int rad=10; }; int main(){ str...
[3 replies] Last: i'll point you to http://www.cplusplus.com/doc/tutorial/dynamic/ which... (by BlatantlyX)
May 2015 Pages: 1... 7891011... 40
  Archived months: [apr2015] [jun2015]

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