Beginners - January 2012

by malice
OR operator in while loop
 
This is driving me crazy, I want the loop to exit when the user chooses '3' or when Enemy.HP is 0 or lower. What's wrong with my while loop? do { Dis...
[4 replies] Last: Thanks a bunch, that cleared things up. I think I had what condition ... (by malice)
Function that searches for the key in an array
 
OK so i'm trying to make this function that asks the user to input a key, then search for the key in array A and inform the user about the existence (true/ fals...
[3 replies] Last: cin >> key; for( int i = 0; i < 10; i++) { if( array = key;... (by roberts)
I can't get my program to work, help? (1,2)
 
I'm trying to make a program that asks a user to enter a three digit number. One output will tell the user the floor number and the second the room number. ...
[20 replies] Last: Thank you! I used int and it works perfectly! (by Sunny101)
Allegro Issues
 
Trying to play with allegro, and it is giving me errors with my debug. Any tips? 'ALLEGRO_TEST.exe': Loaded 'C:\Users\Matt Cromer\Documents\Visual Studi...
[8 replies] Last: Okay thanks (by Matt Cromer)
Difference in primitive data between Java and c++?
 
I've programmed in Java before and now that I'm learning C++ I'm curious as to how C++ treats primitive data differently than java. What are some ways C++ handl...
[4 replies] Last: @L B Talk about standards-defying compilers. That rule has been there ... (by Cubbi)
how to find value of (3^6)+(a^a)?
 
pls help me to find out the value of int a=(3^6)+(a^a); printf("%d",a);
[4 replies] Last: If you want to calculate an expression as if it was: int x=(3^6)+(a^a... (by eypros)
Need help on an array program!
 
Okay, so my assignment was to " write a program that will allow the user to enter 20 five letter words in an array and then place them into a word-find puzzle o...
[1 reply] : The problem description tells you that you need two 2-dimensional arra... (by LB)
some inheritance questions
 
hi, this is my first attempt at inheritance with c++. i was following an online tutorial to help with doing a labsheet for college, thought all was going well u...
[2 replies] Last: http://www.cplusplus.com/forum/articles/40071/#msg218019 (by ne555)
by rupert
while 'variable char' is not 'char'
 
cout << "Is your character Male or Female?" << endl; cout << "Male(m)/Female(f)/Other(?): "; cin >> gender; while (gender != 'm' || gender...
[3 replies] Last: A variable can only have one value at a time right? So if it is one, t... (by LB)
Need Help!!!
 
I am a complete Newb I am 14 years of age and have ZERO experience in game programming, and yet I would like to start with C++. Can someone tell me The best and...
[9 replies] Last: [quote=Sly UX1XN]Whats is API? (sic) It's an acronym for Application ... (by Wazzak)
Can some one reccomend me an api
 
Hi I would like to add grapics to a project im working on and wonderd what people think is a good api. I dont mind a steep learning curve as long as it is re...
[2 replies] Last: cheers Athar ill check it out. (by markkirby)
A second question about inheritance
 
// the base class. No definition for ctor and dtor. class base{ int x; ... } // the derived class class derived: public base{ // the derived c...
[2 replies] Last: moorecm, Thank you for your explanation! (by subjugater)
by Maiels
Password and Username
 
Hello! I made a post before about dialog box in Windows using C++, I deleted it ,I realized how stupid it was. What I want now is to know how to make a program ...
[3 replies] Last: No I don`t want to lock a folder , I just want to enter a password and... (by Maiels)
by patmac
Manipulating variables of type 'string'
 
I have to write a program for school that prompts the user for a text made up of 5 words each ending with a '/', then extracts and prints each word without the ...
[2 replies] Last: Hallelujah!! Thanks a lot hamsterman! If you were next to me I would k... (by patmac)
A question about inheritance
 
Suppose I define a base class and a derived class in the following way: // the base class class base{ virtual void fa() = 0; void fb(){fa();} } // the d...
[9 replies] Last: You shouldn't do it in any ctor/dtor. What will happen is it will onl... (by Disch)
no match for 'operator+' with std::string::operator+
 
I wrote this code for a small word counting algorithm: #include <iostream> #include <string> int wordCount(const std::string&); int main() { std::cout<...
[2 replies] Last: That worked, and I understand my fault, I think: I need a const_itera... (by waqqassheikh)
Init array in function
 
template<int _size> Matrix<_size> Matrix<_size>::operator + (const Matrix< _size> &rhs) const { Matrix<_size> m; for (int i = 0; i < (_size*_size); ++i...
[7 replies] Last: Thanks again (by calypso)
Distinguish between reference and value parameters?
 
How are reference and value parameters distinguished syntactically? How would the execution of a program change by changing a parameter from value to reference?
[1 reply] : When you pass by value, a copy of the object is passed to the function... (by Athar)
Reading audio WAVE file data & header
 
Hi everybody, I try to read a WAVE file in order to apply later a DFT but I got some problems. I legaly got a WAVE file here : http://soundcloud.com/alec_...
[2 replies] Last: Thank you! (by Polochon)
splitting a certain value three ways - if/else
 
Hi! Im trying to input three values PreComp, InlComp and PosComp into if else statements, then depending on the values of these three numbers use the if/else...
[9 replies] Last: thanks for this histrungalot! (by frenchcr)
January 2012 Pages: 123... 48
  Archived months: [dec2011] [feb2012]

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