Beginners - March 2016 (Page 38)

How does this source code know that gameOver means to turn off?
 
I've been studying a snake game program but I can't figure out how the program knows how gameOver means to turn off. #include <iostream> #include <conio.h> ...
[1 reply] : while (!gameOver) gameOver is a boolean value that can be set to tr... (by megatron 0)
need help with displaying output file.
 
- I did # 1 .. but i am really confused on what i am supposed to do on # 2,3, and 4. 1. Read in an input file name. If it is not a valid file continue to pr...
[4 replies] Last: @curiousfloridian The intermediate between both operations (i.e the r... (by megatron 0)
Simple Calc: Problem 1
 
Hey guys,so I hav been learning c++ off time for 2 years,and in this time I suppose I hav learnt the basics of the language enough to start some projects of my ...
[2 replies] Last: Without looking at your code, there is a Bjarne Stroustrup book; I can... (by megatron 0)
Constructor and overload the operator help!
 
hi i was wondering if someone can help me in writing this: 1. Constructor Student() to initialized name, course and phone_no to empty string and set id to 0. ...
[2 replies] Last: Tq for the reply, now i got the idea how to do it.....yah the line 31-... (by bryan1288)
by MCWAL
Please people help me. I really need your help.
 
I don't know how to solve this task. I tried many times, but for nothing. Can anyone solve it and explain me? Here is the task: (if possible, solve it without...
[10 replies] Last: No worries it's not something people think about when first starting. ... (by megatron 0)
compound interest on loan
 
Hi all I posted a few days ago but the thread wont let me re-post into it or answer questions that were asked. Somewhere in my code the compound interest and...
[7 replies] Last: Dhayden: very good point on the NU_MO issue that retains the old mont... (by WPSPIKER)
cin.getline not prompting for input after hitting Enter
 
Hello. I'm having trouble with a project I'm working on. The idea is to create a Mad Lib type prompt, where it asks for the user's input based on the tags withi...
[1 reply] : do{ cin.getline(answers, 256); }while( strlen(answers) == 0 ); ... (by ne555)
by Darwin
How to break down numbers
 
so im just new here and i really need the help now. This is a problem from a book, and im really having a hard time doing it. So here's the problem. I need to...
[no replies]
Postfix Exp
 
I am having a problem with my postfix algorithm Right off the bat, when I ask the user to enter a postfix expression such as: ab* the program will say the...
[3 replies] Last: It works for me #include <iostream> #include <string> using namespac... (by Thomas1965)
by cojeap
Error inside of locale_facets_nonio.h
 
I included std_lib_facilities.h from the book "Principles and Practice using C++", i wrote my code but cannot compile. i get the following error Error: /usr/i...
[1 reply] : My VC++2010 also doesn't compile it. VS2013 CE does. This include file... (by Thomas1965)
by WhatIf
Need more clarification about object declaration
 
Hi, I have 2 classes, First.cpp and Second.cpp First.h #ifndef FIRST_H #define FIRST_H #include <second.h> class First { private: Second sec; public: ...
[6 replies] Last: The #include is a preprocessor directive , just like the #ifndef, #en... (by keskiverto)
Mad Lib
 
I'm trying to write a Mad Lib program. For this part, I don't want to read from a file and ask the user for the inputs. I'm having a few problems. My program...
[3 replies] Last: Thanks, I changed the function to: void prompt(char array ) { ... (by aerichsen)
I/O file - am i following the direction?
 
• Prompt the user for an input file and an output file. - The input file must be a valid text file and exist. If an invalid file name is entered the u...
[3 replies] Last: Very welcome, glad to help. :] (by megatron 0)
Can you makes the evil goto clean?
 
I've decided for future use to come up with a generic console input function. I needed a quick way to escape a nested if to the "failure" case. I will clean ...
[4 replies] Last: JLBorges - You never cease to amaze me. return get_stdin_input( valu... (by megatron 0)
For loop won't loop in Array
 
Hello I am trying to find the largest double in a array with a for loop; However, the for loop is not looping. It does get the double and sizeOfArray is right, ...
[1 reply] : Line 17 After the if statement on the first iteration, it will ret... (by integralfx)
for game square
 
Hello,how me need square 3x3 for game?? Somebody knows? int main() { const int row=3; const int col=3; int arr ; for(int i=0;i<row;i++) { ...
[3 replies] Last: Not sure what is needed. This will at least compile and run: #include... (by Chervil)
classes
 
I'm writing a program to be able to accept information from a "customer" (program user) and then store it all before showing the customer what products our stor...
[2 replies] Last: turk, thanks for the reply! So if i'm using that string of code, am i ... (by Sparrow17)
Program 'Ends' after Menu Option Is Selected
 
Could use some direction on what I am doing wrong! I believe I have the code completed to according to the given requirements but am not able to get it to do an...
[no replies]
String Sorting Program Help
 
I need to create a program that takes the names array and uses a selection sort on the names in the array. This program I created is giving me some trouble and ...
[3 replies] Last: For the first error your function prototype doesn't exactly match the ... (by jlb)
Error in Operator Overloading
 
Hello, I am currently trying to do a problem out of the back of a C++ book I have that is asking me to do several things, one of which is overload several oper...
[3 replies] Last: Those two tips solved the error, thank you guys! (by Joanjava)
March 2016 Pages: 1... 3637383940... 47
  Archived months: [feb2016] [apr2016]

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