Beginners - February 2018 (Page 9)

by jb2918
declaration is incompatible with "std::string getDay(<error-type> d)" error help
 
when i introduce getDay at top it says : declaration is incompatible with "std::string getDay(<error-type> d)" declared at line 22 How can i get this error to g...
[1 reply] : Uppercase and lowercase are NOT the same. Look VERY carefully at dayO... (by lastchance)
While Loop Problem
 
Hello, I am currently learning about While Loops in my C++ class, and while this has been mostly no issue for me, I am having terrible trouble creating the f...
[3 replies] Last: Thank you SO much! Did not even think to reset starting parameter aft... (by juliabrushett)
Dynamic arrays and pointers problem
 
If it's not pointer overwriting, then sorry for the incorrect title, but I think it is the case. The thing is: I am working on an exam program in C++ which is b...
[3 replies] Last: I finally fixed the bug, thanks to the guy kbw for advices :) Proble... (by WhiteroseX)
Issue with input validation
 
In this part of the program, I am asking the user to select an option from the menu. The only acceptable input should be 1, 2, or 3. The validation is working f...
[3 replies] Last: Have you tried the perfectly good solution that @fiji885 demonstrated ... (by lastchance)
by atl13
Please Help!! Don't even know where to start.
 
Write a Pyramid class. For this program challenge, the pyramid is a right square pyramid, it has a square base and its four sides are isosceles triangles of equ...
[4 replies] Last: @ OP, What does your header file of your Pyramid Class looks like? Wh... (by chicofeo)
Finding Prime Numbers
 
I have several question. First time on this site btw as you can probably tell. Anyways my first question is how do i keep the program keep repeating untill th...
[5 replies] Last: Yes, you are right Jonnin. I suppose I was wasting a bit of time loopi... (by Manga)
Checkboard array won't print properly?
 
Hi, I have an assignment and part of it is to create a checkerboard array that looks like this: 1 0 1 0 1 0 1 0 0 1 0 1 0 1 0 1 1 0 1 0 1 0 1 0 0 1 0 1...
[1 reply] : Lack of indentation and the lack of of { } (block braces) are what is ... (by Ganado)
break in switch statement terminates program
 
Hi guys I am writing a restaurant ordering system,the code is pretty sloppy and I will need to break it into more functions(tidy it up) anyway I have come acros...
[2 replies] Last: very good point coder777 I added return true after the switch so if th... (by adam2016)
"template requires arguments" ERROR
 
I am having some problems with a line of code. I have set up a stack class using a template in my header file, I have template <typename myType> class stac...
[6 replies] Last: I am not able to recreate the problem with a shorter piece of code, so... (by closed account NCRLwA7f)
by isan
get error pure virtual method called terminate called without an active exception when use I thread
 
I want to use thread in my Client program to run functions together but I get this error pure virtual method called terminate called without an active exception...
[5 replies] Last: std::thread will takes a function and its arguments. But you're passi... (by helios)
by atl13
Previous forum but have some code typed out. Still need help though!!
 
Write a Pyramid class. For this program challenge, the pyramid is a right square pyramid, it has a square base and its four sides are isosceles triangles of equ...
[1 reply] : What do you need help with? (by kbw)
Question about scope in a class
 
I am in question of how scopes work in a class. For example: class MyClass{ int V1; public: ... Something ... private: ... Som...
[3 replies] Last: I guess that author asked about would it be public or private. In this... (by DonRumata)
Derived classes question
 
I'm working on an assignment for my C++ class where we have to create two derived classes: Auto and Transmission from base class of Inventory. I am done creatin...
[3 replies] Last: Thank you all ! I got it to work! I appreciate your help! (by mysiarobin1987)
by Kwota
Min, Max and Median Project Help
 
I am new to c++ and need to write a program to get three integers from the user and outputs the Min, Max and Median. The catch is that, they all need to be diff...
[1 reply] : It seems like the main program could look like: int main() { int n1,... (by keskiverto)
3x3 magic square algorithm problem
 
3x3 magic square is an NxN matrix in which every row, column, and diagonal add up to the same number. the algorithm: Start with the middle entry of the to...
[4 replies] Last: thank you. (by newguy17)
Prompt/Input and code not executing.
 
Hello, folks I am working on a project for my C/C++ course and I ran into a roadblock. The professor wants us to have a splash screen, prompt for user input and...
[1 reply] : You need to call the input_Screen()/output_Screen(...) functions withi... (by coder777)
Removing newline in array of string
 
Hello. First off, i have the .txt file that reads like this: Abraham Jackson, 10, 15, 10, 13, 8, 18, Joe Harrier, 13, 4, 5, 27, 12, 14, Thomas High, 21, 2,...
[1 reply] : By using std::ws before calling std::getline you can get rid of all wh... (by Peter87)
by rio97
C++ beginnersProgram
 
Hi I'm a student of computer science and I'm doing c++ programming class and I'm really stuck in a homework about making a program that needs to prompt the user...
[1 reply] : Have you covered loops? You'll need to repeat asking for input until ... (by kbw)
Counting the number of Even and Odd numbers
 
So the assignment is to ask the user for certain numbers to display on the output. These certain numbers are then added up to show the total. Then the user must...
[1 reply] : To check for even number, you could use the modulus operator % . To g... (by chicofeo)
grid array
 
Right now this prints out an 8 by 5 grid. Is there a better way to initialize the board instead of copying and pasting {'.'} Is there a way i can print the sam...
[2 replies] Last: thats exactly what i was looking for. thank you (by fivestar)
February 2018 Pages: 1... 7891011... 28
  Archived months: [jan2018] [mar2018]

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