General C++ Programming - April 2013 (Page 51)

by Dineo
how do I Differentiate false statements in a function
 
I'm havin trouble outputing different false statements in a boolean function... I'm currently working on a "secret number game" program which must generate a se...
[6 replies] Last: Now that's another way of doing it..wow there really are different way... (by Dineo)
Making Pacman In C++
 
Hello guys, Over the past reasonable amount of practicing time and months, and a long period of practicing my C++ programming skills by use of solving exercises...
[3 replies] Last: I don't know if it is possible to make a "console" pacman... mainly un... (by Nobun)
by kohlh
precompiled header files
 
I am not sure if the title is saying what I am about to ask. My teacher talks about header files just having definitions and not declerations. I am writing a pr...
[2 replies] Last: This isn't how headers works. #include is a preprocessor directive w... (by MiiNiPaa)
Virtual classes / functions
 
In a header file: class GenericClass { public: virtual int doit(int* array, int sizeOfArray) = 0; }; class Class1: public GenericClass { publi...
[5 replies] Last: No. Generally, the way it works is that polymorphic classes store poin... (by LB)
by umera
C++ program to convert normal text to mobile text
 
can sumone help me with a program that reads in a normal text file and converts it into mobile phone text. that is if the word is 3 characters or less then the...
[5 replies] Last: I am talking about noisedisruption.txt. you have no error checking fo... (by writetonsharma)
help please
 
Area of the room Your task is to write a program that will find the area of room in a given square maze. Note. Use recursion for solving this problem. ...
[8 replies] Last: They should say: "Reported by [insert name here]" (by Script Coder)
Noobie at Coding
 
Task: Write a function: - exp(x,y): - where x is positive (possibly a decimal) and y is a positive integer. - Returns x to the y. - The definition of x to t...
[3 replies] Last: If you don't know what it does, then why did you write it? ;) (by LB)
kindly Remove this 1 simple error
 
Gives Error: string undeclared identifier in void setName (string first, string last); #ifndef personType_h #define personType_h #include <iomanip> #includ...
[2 replies] Last: Thanks abhishekm. (by Rehan FASTian)
by cerlmc
Help with simple if else statements
 
I'm doing a project for school pretty simple but I must be over looking something because when i wrote the code it's not evaluating how I'd like - the first if ...
[1 reply] : Have you tried outputting compensationBonus after you calculate it? ... (by LB)
Save to File problem
 
I have a project that is suppose to take data for employees, put them into vectors, then allows the user to sort out the data based on the separate inputs (ex: ...
[1 reply] : I was able to get it to work. (by crimsonzero2)
Arrays
 
Trying to do a homework assignment for a class and cannot figure out how to read a file into an array. I've looked in our book and on several other forums and c...
[3 replies] Last: You probably shouldn't use vectors, then. The logic is still the same,... (by LB)
by rgork
How can I return a value from a pointer?
 
Probably unclear title, but I'll try to explain better. Here is what's up: struct Square {int number, myClass* myclass}; int main() { vector<myCla...
[1 reply] : The way you're trying to dereference " myclass " is actually the synta... (by closed account zb0S216C)
Array of structs w/constructor
 
I can't seem to remember everything I should about constructors. I'm looking for a way to create an array of structs, using a constructor. My code should explai...
[2 replies] Last: Yep. Worked like a charm. Thanks. (by codedope)
functions
 
Write the function void readTestScores (double &exam, double &tavge) that does the following: - print the prompt: "enter exam score:" than read the exam score ...
[no replies]
by ibilal
Mid of stack using LinkedList
 
Hi all, I am unable to make any logical algorithm to access middle of stack. Please guide some with examples. I am using stack implemented with linkedlists, ...
[6 replies] Last: It is strange enough but std::stack has no constructor with initialize... (by vlad from moscow)
Using an enum defined in class
 
Hello everyone. I am trying to write a game in C++ with SDL, and I have a class that allows me to handle events. The class is actually really simple: It tak...
[6 replies] Last: Thanks for the answers, but why do I have to do it in one file? I'm u... (by doug4)
Initializing generic type that can be both primitive and object
 
I have defined my own class, Queue, which inherits from my own class, LinkedList. I have been using templates to allow Queues to be of int, string, etc types. ...
[2 replies] Last: Whoa, thanks. I did not know that. Seems useful! (by estomagordo)
by Danja
C++ maze
 
Hello, I've been working on a C++ maze assignment but I've become stuck -- below is the code I have so far. I'm trying to get it to print the unsolved maze (...
[3 replies] Last: You will need a lot more code if you want to know if a move is valid a... (by IceThatJaw)
Program help
 
PART I Put all the code in a .doc file and include a UML diagram for the Airplane class. You can use Microsoft Visio or another drawing tool. The code must co...
[14 replies] Last: It actually is. (by Tim0195)
C++ Two Dimensional Array with Pointor
 
int sum(int (*ar2) , int size); // I dont know what the ar2 is going on int main(){ int data = {{1,2,3,4},{5,6,7,8},{9,10,11,12}}; int t...
[4 replies] Last: @alantheweasel int sum(int (*ar2) , int size); // I dont know what th... (by vlad from moscow)
April 2013 Pages: 1... 4950515253
  Archived months: [mar2013] [may2013]

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