Beginners - February 2018 (Page 23)

Function Issue
 
im not sure why char x is not displaying anything at the end. #include <iostream> #include <cstdlib> using namespace std; char value_assigner(char pos)...
[12 replies] Last: there is a c++ newer random tool, but some more info.. srand basicall... (by jonnin)
Debug
 
can someone please help me debug this? // function counts down from higher number to lower number entered // e.g., if numbers entered are 4 and 8 // outp...
[4 replies] Last: c++ supports overloading of functions. so this int sum(int a, int ... (by jonnin)
Error in loop
 
Look closely at line 12. A for loop uses ; (semicolons), not , (commas) http://www.cplusplus.com/doc/tutorial/control/
[1 reply] : #include <iostream> using namespace std; int main(int argc, char* a... (by SamuelAdams)
by pavik
code doesn't compile
 
I'm using CodeBlocks, with GNU GCC compiler (ver. 4.9.2). In Global Compiler settings the "Have a g++ follow the C++ ISO C++ language standard [-std=c++11]" fla...
[5 replies] Last: if your compiler doesn't have anything else available, you can drop to... (by jonnin)
Debug
 
can someone please help me debug this? // Function displays course information // instructor defaults to Staff // enrollment defualts to 30 #include<iostrea...
[2 replies] Last: still a bit unclear sorry. (by Masonbrady3)
by urko18
How go back in the code
 
Hello! I have a problem, how can I change the GOTO (line 154 to line 93) of the following code for some other structure that does not give so many problems? ...
[1 reply] : Hello urko18, If you are going to use a "goto", which is not the best... (by Handy Andy)
read a file line by line
 
Hello experts, I'm very stuck with this because I'm a super beginner/... I've got a txt file that contains multiple lines as below: AB, C, 1111 C, D, 10156 XY...
[2 replies] Last: Here are two possibilities, but there are many more. #include <iostr... (by lastchance)
In desperate need of help....
 
I am making a simple program that asks for the number of miles a car gets when driving on one gallon of gas. Then it asks how many gallons are in the car's tank...
[7 replies] Last: Have you included the #include <string> as in my last post? It's qu... (by lastchance)
by gatsu
help with while loops
 
So for my lap the user has to input several grades ( A A B C ect.)in a single line and the program has to calculate their gpa. I am at a loss on how to do this....
[2 replies] Last: #include <iostream> #include <cctype> int main() { char letter; ... (by lastchance)
by nm1206
Need help with if statement and error messages
 
Hello everyone, was wondering if you could help me figure out how to do the if statement to show these if the user inputs certain things. #include <ios...
[1 reply] : if (!(cin >> unitNumber)) { cout << "Error: You did not enter a... (by coder777)
Do-While Loop Help 911!
 
A file is downloaded and placed in your working directory. Write a program asking the user for the name of the file in main. If the file does not exist, the...
[1 reply] : Maybe like this: int attempts = 0; bool success = false; do ... (by Thomas1965)
relocation truncated to fit: R_X86_64_PC32 against undefined symbol
 
Getting a weird error when running this program and I can't seem to figure out what is going on. This is what the error shows: /cygdrive/c/Users/brrr/OneDrive/...
[2 replies] Last: Your function addTotal at the bottom should be called getTotal, and, a... (by lastchance)
How to use "
 
Hey there! I'm struggling with adding a singular " to my code on line 28. Is there anyway to make this work without using printf? #include <iostream> ...
[2 replies] Last: cout << "A 6'2 \" person is " << meters << " meters tall"; ... (by mbozzi)
How do i find a minimum across multiple array's of data
 
So i got a question where i need to display the year where the minimum is found and its number. i got the result to post but it loops. how do i set it up so it ...
[2 replies] Last: I see... so i should put If(Y2013 <min) min=2013 ; year=2013 print... (by MarcusHallevy)
by mynava
Descending Selection Sort function
 
Hello, again. I am having some difficulties changing this selectionsort function from ascending to descending. Any help with this would great! void sortSc...
[2 replies] Last: I could have sworn I tried that first LOL. It worked!!! thanks so much... (by mynava)
by kam975
more else if help :)
 
i am having trouble getting all of my conditions to be well, conditions. it seems it will check if the response == X, then it will sort of ignore the rest of th...
[7 replies] Last: !isnan(variable) and isnan(variable)==0 should give you the same r... (by Peter87)
by MBruno
Segmentation fault in function insereAVN
 
Segmentation error in function insereAVN with keys above 7940. Help! #include <cstdlib> #include <stdlib.h> #include <iostream> #include <fstream> #...
[6 replies] Last: I thought with type* variable = malloc(sizeof(type)); doing free(v... (by barnack)
Dice rolling problem
 
The questions is "Chevalier de Blasé, a notorious 17th century gambler, wanted to know whether he had higher odds of winning a dice game with four dice, where ...
[2 replies] Last: I think it's exactly 4 fours for game2 (by barry23)
Void Function not displaying
 
Having issues figuring out why when I call the displayMenu function that no output is showing? The project I am working on is more complex than this, but I thin...
[2 replies] Last: Just figured that out as you were probably typing that. Definitely sma... (by rabe5775)
by mynava
Functions not working as they should
 
Hi there, I have my code that I have been working on for a week straight and all the research I've done has lead me here to see if I can get some much needed he...
[6 replies] Last: Misenna, thank you so much for your help!! I made the adjustments plus... (by mynava)
February 2018 Pages: 1... 2122232425... 28
  Archived months: [jan2018] [mar2018]

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