Beginners - September 2018 (Page 19)

by MrMode
Using varibles to create new object.
 
Hello, is it posbile to create new object from variable string nameOnList and number wich would be a passed into constructor . int menu(); int selection; int...
[7 replies] Last: Hello MrMode, After working with the program I have come up with for ... (by Handy Andy)
by irush
all IF statements print please help im new to this.
 
when I run my program it prints all of the if statements. I think it is the grammar, but I have tried removing the ";" because it ends the If statement and goes...
[3 replies] Last: You're welcome. Hope it helped. (by MikeyBoy)
My lottery program artimetic works!
 
Powerball chances of winning is 292 million. With my artimetic there is 80 million chances. I am checking Powerball numbers everyday. All the combinations we...
[3 replies] Last: Is this the lottery program which models a fantasy world, in which the... (by MikeyBoy)
Josephus problem solving
 
How does the process work? #include <stdio.h> int josephus(int n, int k) { if (n == 1) return 1; else return (josephus(n - 1, k) +...
[1 reply] : You can trace it manually. You do know that the main() calls josephus... (by keskiverto)
validate
 
Write your question here.
[1 reply] : hello Tuxs Cavs, The answer is 42. https://www.youtube.com/watch?v=ab... (by Handy Andy)
by nirbh
problem understanding a paragraph in c++ primer
 
Unlike the other integer types, there are three distinct basic character types: char,signed char, and unsigned char. In particular, char is not the same type ...
[3 replies] Last: Thank you tpb. Thank you JLBorges. (by nirbh)
by Lithia
Playing with getline()
 
Hello, I was playing around with getline() seeing what I can and can't do with it and tried this: #include <iostream> using namespace std; int main() { ...
[3 replies] Last: You can type input to the program at any time. When you read from cin ... (by Peter87)
Sorting an Array
 
I'm trying to sort an array by students' last names and GPA. The sortLastName function isn't working at all, while the sortGPA function is kind of working. It's...
[2 replies] Last: You could also compare your solution to: http://www.cplusplus.com/refe... (by keskiverto)
by Tett
Problem with hex converter
 
So i made a decimal to hex converter and its almost working or at least for the first char. Any idea why it won't work? #include <iostream> using namespa...
[4 replies] Last: [quote=Tett]They convert the number to base 16. I tried putting them o... (by Peter87)
Integer overflow
 
Hi. I have a problem, need everyone to help: #include <iostream> #include <limits> int main() { std::cout<<std::numeric_limits<int>::max()<<'\n'; // 2147...
[4 replies] Last: Unsigned integers doesn't really overflow in the same sense that signe... (by Peter87)
by HarGar
Cannot get the second half of my program to compile
 
Hi coders, I have been working on this assignment all day, and the code just wont run properly. When I compile the code it prompts me to enter the inputs ...
[2 replies] Last: I'm surprised it compiles since there are no overloaded setter functio... (by SimpleCoder)
Accepting arrow keys as input in if statements
 
I am a junior in high School and taking a c++ coding class. Our first assignment is to make a text based game we are allowed to use anything as input but the te...
[5 replies] Last: Good. Thanks for trying it. (by tpb)
Send input to another .exe
 
Hello there! I hope you are having good day/night! :D. TL;DR : How to send input into another .exe? My goal is to create a simple Machine Learning algorithm, ...
[3 replies] Last: which method? I gave like 6 ways... tcp for example, pseudo code (yo... (by jonnin)
please help me with the following c++ problem
 
Consider the following class declaration: class ExamType { public: ExamType(); ExamType(string m, string v, int t, string...
[2 replies] Last: Hello sjomelo01, Like hoogo mentioned PLEASE ALWAYS USE CODE TAGS (t... (by Handy Andy)
Structure type variable inside structure class.
 
what does struct ListNode* next; mean? I took the struct out it is still working. Also, what does newNode->next = NULL; mean? what is the concept of this? ...
[1 reply] : struct ListNode* next; is a struct that holds information about a no... (by H00G0)
What Index is in Vectors C++
 
Hello ! I have this code about finding the max from a vector , i do understand it , but in another code , i have to find the max in vector and his index , i rea...
[6 replies] Last: THANK YOUU , I UNDERSTAND , THANK YOU SOO MUCH , Here shorter expli... (by WalterCC)
how to change the code in the program and keep the changes
 
I'm learning c ++ for over a month and I'm progressing. I'm wondering if it's possible to change the code within the program itself, and then keep that change. ...
[5 replies] Last: Yes, what Peter87 said! Also thank you JLBorges for providing an examp... (by H00G0)
Linked List Display Function Not Working.
 
Hey Guys,This Function is not working as expected,It will not display disp.pname The lines before the structure pointer declaration are working fine. I have tr...
[1 reply] : You can't call main recursively. Use a loop instead. It's entirely po... (by dhayden)
C++ || Help With Console Menu & Status
 
Hi guys, I have some questions relating to a game trainer I am making. I have tidy up the code from my old code. Also if anyone can have a look at my code and s...
[6 replies] Last: #include <iostream> #include <vector> #include <string> std::size_t ... (by JLBorges)
getline
 
my getline isn't working can someone help #include <iostream> #include <string> using namespace std; struct StockInfo { string coname; ...
[2 replies] Last: thank you , silly mistakes ! (by poohbear)
September 2018 Pages: 1... 17181920
  Archived months: [aug2018] [oct2018]

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