Beginners - January 2019 (Page 6)

convert data type
 
what difference between 2 bellow code? #include <iostream> #include <string> void test(double a) { std::cout<<a+1<<std::endl; } int main() ...
[7 replies] Last: Would you rather store integer values as doubles to avoid an implicit ... (by Grime)
by AM111
Help
 
I have a huge code and in this part it is giving me the error: "stoi was not declared in this scope". However, i put the headers: #include <string> #include...
[4 replies] Last: thanks (by AM111)
by AM111
constexpr
 
Im getting the error: C++11 'constexpr' only available with -std=c++11 or -std=gnu++11. Can anyone help me on this one? constexpr auto CORRIDOR_LENGTH =...
[2 replies] Last: thanks (by AM111)
A vector of vector, but only know the inner dimension
 
Hi I have a simple question to ask. If I want to read a table, which has 16 columns, but unknown rows (which is big). How could I initial the vector of strin...
[5 replies] Last: you could also iterate the file and get the line count and then preall... (by jonnin)
Learning C++ with online courses / YouTube videos
 
Hi everyone, Wanted to update an old topic that was archived. About two years ago, I asked for suggestions for courses and videos to learn C++. I got some...
[1 reply] : Thank you so much for that. It turns out I have huge gaps in basic kno... (by Niythar)
by yat89
reverse order
 
Hi anyone, I'm new to C++ programming. I got a task to reverse the numbers in a certain range. I don't have idea how to do it. Hoping for help from anyone. Than...
[6 replies] Last: Salem c, sorry i had made a mistakes.. u re right the i have repeat 83... (by yat89)
How to avoid slicing?
 
Hello, I have problems with object slicing. I am passing a Derived instance as a parameter in my constructor. Because member variable "base" is copy construc...
[5 replies] Last: Thank you for all replies. The problem with references is that if I p... (by Unspoken)
For Loop Clarification
 
I am really having trouble grasping certain parts of this function so i will break it down to my knowledge and please correct me where i am wrong so the code...
[3 replies] Last: If guess is "hello" and hidden word is "world", what answers do you ex... (by salem c)
by yup2
Inserting csv info into a vector
 
I need help populating my vector with the 3 existing entries. I have unsuccessful in finding a video or guide in doing so. Thank you for your help! #include...
[1 reply] : Try this #include <iostream> #include <string> #include <vector> #in... (by salem c)
Seems to skip if-statement
 
This code extracts the domain from an email address. The if-statement resolves to true; however, the variable at_index is not incremented. In fact, the program ...
[5 replies] Last: Roger that, VS doesn't show the warning until I compiled it at warning... (by aaronvan)
can you resolve my project ? please!!
 
Seen this somewhere else: http://www.cplusplus.com/forum/general/248903/#msg1096681 https://stackoverflow.com/questions/35256412/having-trouble-with-a-college-p...
[14 replies] Last: ( ) | \ _.--------,_... (by dutch)
Need help understanding syntax
 
Okay, so the two pieces of code below are from a couple of questions which I was doing; I think maybe they're probably designed to be slightly confusing, in whi...
[3 replies] Last: Hmm, okay, I need to spend some time going over your comments. Thank y... (by Cheddar99)
by Mfy22
Queries Help Please
 
I have a code that is not quite working, it's supposed to show the query but it just copys the last number //Queue #include<iostream> using namespace std; ...
[3 replies] Last: When I do the first one it shows me the queue in the order i put it. ... (by dhayden)
Merge sort not working
 
I have been trying to understand why it does not work for 3-4 hours straight and I still do not get it. #include<iostream> using namespace std; int v ...
[2 replies] Last: It's best to interpret a range X-Y to mean "values starting at X and r... (by dhayden)
Trouble with increment in For loops
 
I can't understand why variable j doesn't increment its value in this for loop... int WinOrLose(unsigned int v , const int size_v, const int n){ f...
[2 replies] Last: @dhayden ohhh right, thank you, I didn't see it... (by RustyJoe)
by op10
Can i make two objects share the same members data
 
sorry , it's kind of a newbie question but is there any possible way to make twon objects ,for instance, with the same name member share the same data for the r...
[1 reply] : Static data members, and how to use them: https://www.includehelp.com... (by closed account E0p9LyTq)
Wrong output from for-loop
 
Hello, I have the following code vector<int> calculateSeries(int lån, int år) { constexpr int rente = 10; vector<int> innbet(år); in...
[2 replies] Last: Thank you, figured it out now!! (by kyrresc)
by ddail
infinite loop issue that is elusive as ever
 
I am creating a game of pig where the user plays against the computer in a race to reach 100 points. they take turns rolling the die and adding up the points un...
[5 replies] Last: It might help if your program wasn't a ball of mud. I was going to ... (by dhayden)
READING FROM FILE WORD BY WORD !
 
Hello everyone ... I am really beginner in c++ and i need help in this My question is : How can i complete this code below to read WORD BY WORD from input.txt ...
[6 replies] Last: Thnaks you so much ... that really helped me ^_^ (by MohammadAlshareef)
Is there problem to declare an empty char array? (1,2,3,4,5)
 
I'm confused. Somebody declares array as char c ; . But I found the compiler does not stop me and there's no error after I've declared the array with char c ...
[82 replies] Last: One reason I can think of is if you use duplicate string literals in s... (by helios)
January 2019 Pages: 1... 45678... 17
  Archived months: [dec2018] [feb2019]

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