Beginners - May 2008

NIM game
 
I need a little help to create a NIM game program in C++. It has 2 functions, first, int playermove() that outputs number of matches, asks player to make move b...
[4 replies] Last: thanx Zaita. (by wander4heat)
Division Problem
 
I am trying to make a simple math program, everything else works fine, the adding, subtracting, multiplication, but the division seems to crash quite a bit(I've...
[2 replies] Last: Fadrax: Instead of testing if b == 0, why not making sure that b can'... (by Somelauw)
Question on Syntax
 
I have a question on this syntax... what does the underscore mean on some of this code _legs _bark _dogSize why not just say legs or bark ? is there any...
[3 replies] Last: Here's what the C++ Standard says (17.4.3.1.2): "Each name that con... (by Duthomhas)
How to convert string to *char for strcmp
 
Here is my code: bool SpellList::searchList (string target) { bool found; pPre = NULL; pCur = pHead; while (pCur && strcmp(target, pCur->nam...
[4 replies] Last: If your compiler can't convert a std::string to a const char* usin... (by Duthomhas)
Hello world
 
Hello im new beginner in c++ i have download the c++ but i dont know how to use!! Can somebody to tell me with photo how to use? please!!:D
[3 replies] Last: Hehe thnx for reply's I have download compiler. i know to 2 copy an... (by Gepardi)
how to create programme code for the condition below?
 
1)user must key in total amount of sales per day. example, $234 2)programme should calculate salary salary=sale x 9%+200 input of sales should loop 5 t...
[9 replies] Last: By the very nature of an open forum, you will get advice that you may ... (by closed account z05DSL3A)
by bettie
using classes and arrays
 
how do i create a telephone directory using classes and arrays? I'm really lost. My tutor is abroad at the moment. And i really need help.
[1 reply] : Try to develop a data-structure first. Once you have this worked out,... (by int main)
difference in "flush", "ofstream::flush", and "endl"
 
Hi, I am trying to understand the point and use of flushing the buffer. When testing the code in the examples in the cplusplus.com reference for ofstream::flus...
[3 replies] Last: Flushing the buffer is, in this case forcing the contents of anything ... (by bnbertha)
What's an enumerated type?
 
Please explain it VERY carefully as I am retarded and know none of the lingo. Thank you
[6 replies] Last: @mrtwinkle You should also thank the others. Their explanations are... (by int main)
by doraid
How can i do ascending sort in 4*4 array
 
how can i sort 4*4 array elements (ascending sort)
[9 replies] Last: No offence taken :). Nice to know that the thing I came up with has... (by int main)
Simple C++ Encryption/Decryption Program
 
Ok I think I have everything I need to get the output of: Encrypted string is: uijt!jt!b!tfdsfu" Decrypted string is: this is a secret! #include <...
[6 replies] Last: OK thanks, that fixed it. I guess I need to learn about pointers now. ... (by iansane)
question on pointers....
 
i have defined my struct as: struct coord{ double _long; double _lat; double _height; }; then i did this: coord *KElist = new coord ; for (i ...
[5 replies] Last: Agreed. new coord ; is not valid. Your not telling the OS how much m... (by Zaita)
by Maydaa
i've an error while compiling
 
class Roman; { private: string Roman_Number; int Roman_Decimal; public: void Get_Info ( ); void Number_Convert ( ); void Info_Convert ( s...
[1 reply] : class Roman //; { private: string Roman_Number; int Roman_Decima... (by closed account z05DSL3A)
by skev
calculating total
 
hi everyone i'm having trouble calculating the total in my program. could anyone give me a hand? thanks alot. #include <iostream> #include <fstream> #inclu...
[3 replies] Last: In general, there is one significant problem with the program, and the... (by icemanfan)
School project
 
Hey to the people out there. I need help with my school project due on 03/06. I've got my codes all done out, but its copied from a friend of mine and I have do...
[4 replies] Last: It would be easier to reference specific lines of code if you put your... (by icemanfan)
What's wrong with my program?
 
Here is part of the code for a program I copied out of a textbook: int main() { //Local Declaration char *encDec = { { "A", ".-#" }, { ...
[3 replies] Last: Thanks for your help, bnbertha. I discovered today, after your suggest... (by icemanfan)
by arfett
entering a string into command prompt
 
The below code is what I'm trying to compile, but dev-c++ is sure something is wrong. Is this not the proper way to input a string (usbdriveletter) into the co...
[8 replies] Last: You can also do somthing like this: #include <string> #include <ios... (by closed account z05DSL3A)
Shutdown computer
 
I was wondering if there was anybody who could help me out with some code to shutdown the computer. I have a group of kids i am working with to make an R.P....
[1 reply] : I assume it's windows in which case ExitWindowsEx() will do it ht... (by bnbertha)
by bashi
strlen function
 
i wrote this programme just to check out the strlen function but it allwaya return the character count as 1 please help #include<iostream> #include<cst...
[7 replies] Last: ok i just figured it out it was not any thing with the code it was a s... (by bashi)
by Darel
How can I read a paragraph in C++?
 
Well Hello, I'm pretty new in this community but I need a little help with this... I'm need to read a paragraph with C++ but when I'm running the program aft...
[4 replies] Last: Wow thanks for the help Duoas, I'll see what I can do with this =D ... (by Darel)
May 2008 Pages: 123... 12
  Archived months: [apr2008] [jun2008]

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