Beginners - February 2016 (Page 23)

Integer returned is some seemingly random number that is really big or really small
 
The following is my entire program. To use it, run it then input this string: 4H 8D 6S 3S 2C 9D KH 9C 6H 7D QC 5D 7C Hit enter to go to a new line then type a...
[3 replies] Last: You need to initialize the integers at lines 70-77 to zero. (by dhayden)
Separate data by storing in array/vector
 
So I have a example text file which contains weather stats. Example of text file: 2012-01-01 Rain 7 13 0.28 2012-01-02 ScatteredClouds 4 8 0.25 2012-01-03 Rai...
[12 replies] Last: I had done some part of it which read the year that user input and it ... (by jovixtee)
Please help in C++
 
class smart { public : void print () const ; void set (int , int ); int sum (); smart (); smart (int , int ); private : int x ; int y ; int secret ...
[8 replies] Last: Thank you very much and the links you sent me was so helpful thank aga... (by zaidnaser)
solved
 
[no replies]
by Lospwr
solved
 
done
[1 reply] : Please don't spam the forum - http://www.cplusplus.com/forum/beginner/... (by TarikNeaj)
strcmp help
 
ok I wrote the code I was to do and my teacher wants us to use a strcmp quit and my program was working great but if I add this function I get some errors. I'm ...
[10 replies] Last: I understand the magic numbers thing I just wish I understood the strc... (by dunnpeaches)
Trying to concatenate elements of string vector into a string
 
I have vector<string> fruits where each element is a string of a fruit name. I want to take each element and concatenate into a string called fruitylicious (ex....
[5 replies] Last: Wow, a single typo messed me up. I immediately disregarded the errors ... (by immortal192)
Multiple Choice user input not working
 
Hey there I am trying to get this program to have a choice of three options A, B, or C and I can't seem to lock it down to just "A or a = option A" or " B or b ...
[4 replies] Last: Also, at the bottom if statement you need to say if(choice == 'B' || ... (by TarikNeaj)
First use of headers
 
I using first time the HEADERS in c so I'm not understanding it well. This is main.c is code!!! #include <stdio.h> #include <stdlib.h> #include "kibe.h" int ...
[2 replies] Last: Tha t is one thing what I forgot but I still get memory garbage.For e... (by redbull1996)
Triangle output
 
I am trying to create a function that outputs a triangle. I have this one below that creates a square and need something similar that creates a triangle. Any he...
[no replies]
Operand Error ==
 
no operator "==" matching this operand VS express 2013 Desktop if (choicegamemode == 1) // first line that has error { //code } else if (choicegamemode =...
[3 replies] Last: You are attempting to compare an integer to a string. Is "fubar" less,... (by keskiverto)
is thaere a cls in c++?
 
ok im making a program to calculat high values and have user in put for my first disign but i want to clear the terminall on the menu and system("cls") dont wor...
[2 replies] Last: With any luck, your console will recognize the ANSI escape sequences: ... (by dhayden)
compile error
 
I am new to coding and I'm taking a intro course this semester. I'm currently stuck on a homework problem: -The mode is the value that appears most often in ...
[4 replies] Last: one of the requirements is to pass an array to the function. Then wh... (by jlb)
Using remove_if() within lists.
 
I spent the past hour reading up on how to use the remove_if() function on the list and forward_list containers. However, I'm having trouble translating their p...
[2 replies] Last: How do I write this expression? reservations.remove_if(this->getName... (by cire)
mixing loops and if else statements
 
is this possible do { cout << "How many people are playing?" << endl; cin >> choice; if (choice > 1 && choice < 2) { cout << "That is not a va...
[1 reply] : No. The else if and else part can't be outside the loop if the "if" pa... (by TarikNeaj)
Loop problem while drawing shapes
 
The following function prints out squares in ascending order (depending on the start and end size). How would I go about making them output in descending order....
[3 replies] Last: Also, would it be easy to edit this code to draw a triangle rather tha... (by tomtom61695)
i need help
 
i cant get this to work iv got a dir like this bin(eng.cpp and deu.cpp)main.cpp in the main file #include <iostream> #include "bin/eng.cpp" #include ...
[4 replies] Last: So, what did you change and what is the error? (by coder777)
Error Question
 
I have an exam 2mmoro. Just saw this question in the last years paper. Just wanted to know whats the answer... Rewrite the following program after correcting...
[2 replies] Last: Actually my C++ was a trial version and just got over & exam is 2mmoro... (by anuasya)
New to Programming
 
Hey, Everyone. I was put into programming class this semester. Professor is really slow talker and half of the class doesn't know what he is saying. He gave us ...
[1 reply] : Hey =) A great place to start is here - http://www.cplusplus.com/doc/... (by TarikNeaj)
Sorting two std::vectors<t> into one list
 
I have problems sorting two std::vector<t> lists into one. Currently I can add monitors, but if one if disconnected it will still be stored in the list (It need...
[1 reply] : What exactly does the problem statement say? (by jgg2002)
February 2016 Pages: 1... 2122232425... 46
  Archived months: [jan2016] [mar2016]

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