Beginners - March 2018 (Page 10)

Space down one line:
 
cout << "\nThis is Sam Cooke.\n"; cout << numberxx << " (years old)\n"; cout << agexx; security = 5; I am trying to space down one line between numberxx...
[1 reply] : Either std::cout << numberxx << " (years old)\n\n"; or std::cout... (by closed account E0p9LyTq)
novice programm help
 
Hello I am very new to c++ I need help trying to set a value for a string. The program gives me the error that "info;" *line 13* needs a value *located below "i...
[3 replies] Last: info is a variable type, like int . You need to create a variable ... (by closed account E0p9LyTq)
Vectors/Arrays adding sum
 
Program needs to accept a positive integers greater than or equal to one,then store values into elements of an array/vector all while executing. then add up th...
[1 reply] : Hi Pomptree, well I don't think you need the for loop, but lets get y... (by SamuelAdams)
system crashed
 
hey guys im sorry i really need your help for my project,the system crased big time. i dont know where is the problem #include <iostream.h> #include <std...
[9 replies] Last: If you want it to display something, you need to cout something.... (by Repeater)
random_shuffle() not working? what am I doing wrong?
 
Hi, I am new to this forum, and to C++ in general (would say I'm intermediate level on Java). Anyway, am keen to learn more about this powerful language. Could ...
[7 replies] Last: Is cppreference the goto site for c++ docs? cppreference was created... (by closed account E0p9LyTq)
Keep getting Run-Time Check Failure #3
 
Write your question here. // Sergio Rogue-Garcia // March 19, 2018 // Lab 3 - #include <iostream> #include <iomanip> #include <string> using names...
[1 reply] : In function 'int main()': 74:8: warning: statement is a reference, ... (by Ganado)
How to run a code with a text file in command line?
 
Whenever I try to run the .exe file from the bin>debug folder in command line, it fails to find the text file that it's supposed to open. How do I fix this issu...
[2 replies] Last: most likely pathing problem. Either set up your files so that the fil... (by jonnin)
none of the 21 overloads could convert all the argument types
 
Hello I'm getting these errors in building my simple app in VS2017 error C2665: 'System::Windows::Forms::MessageBox::Show': none of the 21 overloads could ...
[7 replies] Last: Found and deleted thanks, but it shows -273.25 how to display normal t... (by speed258)
confusion with passing address
 
In the following code at 64 no line ,does push(stack,item); and push(&stack,item); ,both passes address to the function?If yes then how is a user defined type v...
[10 replies] Last: Thanks Ganado. (by samir1996)
division sales (array and functions)
 
so my code finds the highest division sales but for some reason if i have the northeast as the highest sales , it doesn't recognize it as being the highest divi...
[3 replies] Last: greatestSalesAmount is initialized to sales so if that is the hig... (by Peter87)
random numbers:
 
Can someone give me the best and easy codes to create random numbers?
[2 replies] Last: Seriously? It's not necessary to read up on all the engines and all th... (by Peter87)
Issue with exit(EXIT_FAILURE)
 
Hello, i have a issue within my code that does not allow my exit(EXIT_FAILURE) to work properly. Aside from the exit failure, the program is supposed to gat...
[1 reply] : What does work properly mean regarding exit(EXIT_FAILURE)? It will end... (by coder777)
Help :)
 
start: cout << " | Enter Employee Sick Leave: \t\t\t"; cin >> sickleave ; if(sickleave>0 { cout<<"Greate"; } else if(sickleave=0) //check for ne...
[1 reply] : This code does not compile. 'check for negative number' assigns 0 to ... (by coder777)
need idea to solve this Problem Please
 
Write a program that calculates how much money you’ll end up with if you invest an amount of money at a fixed interest rate, compounded yearly. Have the user ...
[1 reply] : 1. Take input from user: http://www.cplusplus.com/doc/tutorial/basic... (by keskiverto)
Matrix multiplication
 
I created this code using vectors such that a user can enter values for a Matrix A and a Matrix B, and then multiply the two. I am not worried about error check...
[1 reply] : Your code: create empty A create empty B get A dimensions add elemen... (by keskiverto)
Computer-aided-instruction environment questions
 
I'm writing a CAI program to help kids learn math and I am running into a few logic errors. Other resources I have tried to use to debug the program have been u...
[1 reply] : Line 33 looks strange. Better remove the parentheses. Line 35: Why do... (by coder777)
Retrieve data from struct array
 
My program uses pointers and structs to read input into an Item struct. If stock of an id no is more than the amount requested, certain bits of info will be put...
[7 replies] Last: Once more: Where is the " array of pointers to sales structs "? ... (by keskiverto)
Choice of programming language for the development of sound games. Should I use C++ or not?
 
Hello. Dear moderators, I understand that this is a forum about C++, but my question is related to C++, for this reason I hope that questions will not come to ...
[11 replies] Last: I made my choice! C ++ and Java! I will study both. Thanks to all. (by Jonikster)
by JakeTL
isPrime Function returning 9, 15, 21, 27...
 
I run this program and I get all the prime numbers I need and them some. It seems to give me non-prime numbers divisible by 3 starting at 9. Any help would be m...
[2 replies] Last: THANK YOU!!! Man I feel dumb. (by JakeTL)
Intro to Using Files in C++
 
So, I'm using infile for the first time, I'm confuse on if I'm doing it right. The file open up. But, it asking to calculate the average exam score. and displ...
[no replies]
March 2018 Pages: 1... 89101112... 29
  Archived months: [feb2018] [apr2018]

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