Beginners - January 2019 (Page 5)

assignment grading project problem
 
This is what it's asking: Write a program that calculates and prints the total grade for n assignments as a percentage. Prompt the user to enter the value ...
[19 replies] Last: @dutch I didn't mean to double post, this is my first time using this... (by RecklessCoder)
by Aurme
first line of input is invisible for while(cin >>)
 
Hello, I've just started working out of Programming, Principles and Practice Using C++, and I came upon a part in which I don't understand the behavior. The bo...
[1 reply] : Works fine for me. That's your terminal emulator doing that, not your ... (by helios)
by Daean
Char/ Int problems.
 
Hello. I'm an c++ beginner, and I want to make a little program, but i am suck here... i don't know how can I do with char, to input more that 1 character. Wha...
[11 replies] Last: String the datatype :0? I don't get it. What happens if you don't incl... (by Grime)
Read File and extracting info from
 
Hi Can anyone point me in right direction for ways to read a file and then extract the information from it. For example someFile.txt Title SomeTitle Som...
[7 replies] Last: The more complicated you make your syntax, the harder it's going to be... (by AbstractionAnon)
call to non-constexpr function in constexpr
 
I know it is a error, to call to non-constexpr function in constexpr. But it is still possible to do that? We are not allowed to use plenty of functions in cons...
[5 replies] Last: what checking are you trying to do? I mean, you can have any number of... (by jonnin)
I need help in average of numbers
 
How can I do the average of numbers through array? #include<iostream> using namespace std; int main() { float a; float b; float sum=0; cout<<"E...
[10 replies] Last: #include <iostream> #include <valarray> using namespace std; int mai... (by lastchance)
delete object outside function
 
test() function doesn't return any (no return pointer, it is void function ) How to delete objA outside test() function use reference? #include <iostream...
[14 replies] Last: Thanks @lastchance,@Grime Thanks for your support. Have a nice day (by kakaducsy)
Code generator
 
Hey! Does anyone have and idea how to make a program which shows me all the 6 digit combinations of 1 and 0 ? Thank you!
[2 replies] Last: #include <iostream> #include <bitset> int main() { for ( int i = 0; i... (by lastchance)
23
 
123
[2 replies] Last: So another idiot trashes the thread after getting their free food. Tha... (by salem c)
Need help with int[int] array subscript error
 
Creating a program to have the user make their own exam. In the part where i am suppose to ask the user how many questions they would like their exam to be, i a...
[3 replies] Last: Hi, I think you still have a problem with variable length arrays (it ... (by TheIdeasMan)
Shuffle function
 
Can someone explain how this shuffling works. So I know it shuffles 100 times. But how does it work? Does it pick 2 random numbers from the Pack and swap them? ...
[4 replies] Last: Really should just use the Fisher-Yates algorithm. The one above ha... (by mbozzi)
float
 
hi everyone. can someone tell me what does mean float..? There is an example: #include <iostream> #include <string> #include <sstream> using namespace st...
[4 replies] Last: float is a primitive type in C++. https://www.geeksforgeeks.org/c-da... (by Ganado)
Write a palindrome
 
I need to write a program that: -makes the user input something then it checks if the user has a palindrome or not -treats capital and lower case letters the ...
[2 replies] Last: After minor changes to make it compile, your code works with "friendly... (by dhayden)
SIGSEGV
 
I am unable to figure out why I am getting an error. removed some parts and ran code but can't point out what is causing the issue. #include<iostream> ...
[18 replies] Last: All of the compilers you mentioned, I assume, use some GCC extension f... (by Ganado)
Noob C++ user, output problem
 
I am trying to make a gpa calculator for a class and I am having trouble figuring out how to convert the character values for the user to input into floats. ...
[2 replies] Last: this is an abbreviated version of the code It is indeed. However, i... (by lastchance)
by Bopaki
I am getting a garbage output when I add two objects
 
I am adding two objects: Box3 = Box1 + Box2; The output is this: Volume of Box1 : 210 Volume of Box2 : 1560 Volume of Box3 : 5400 The sum of Box1 & Bo...
[1 reply] : Line 39 attempts to output the variables defined on the preceding line... (by lastchance)
How do you output an array of structs
 
My question is as the title states, I am having trouble trying to output an array of structs to a file. The program is suppose to create a ppm image with a smal...
[2 replies] Last: I figured out a fix bool writeImage(ColorValues imageArray , int h... (by gtrruff)
I'm new and have little knowledge of what I'm doing
 
My problem is I need to read from a txt and using 3 files that are 2 cpps and 1 header file to read that data in the txt into class variables that are private a...
[2 replies] Last: Your response solved so many hours of struggling, thank you! (by apocrypha)
Detecting a letter within and on the back and front of something
 
I am aware of the syntax XYZ.front() //and XYZ.back() // I am unaware of how to detect a character in the midst of a word, like the 'a' in 'rain'...
[3 replies] Last: sorry for the late reply, but great! I can work far with this! (by closed account 367kGNh0)
by jb03
I Need Help with the Display Function!
 
I am trying to read files then display them on the Display function. Can anyone please tell me what is wrong with this code? I am super confused right now. I ha...
[5 replies] Last: Lines 30-31: It's not entirely clear where times and times come fro... (by AbstractionAnon)
January 2019 Pages: 1... 34567... 17
  Archived months: [dec2018] [feb2019]

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