Beginners - August 2021

How to properly access members in constructor using set and get methods
Hello, i searched a lot on how to properly do that, but it seems like i am stuck on very simple task and the code below is absurd. The variables are private th...
[7 replies] Last: Hello georgio, You are welcome. In the constructor why did you add... (by Handy Andy)
Hello I came in September 2020 for a language (Sally : ) interpreter that I am trying to modify, you had help...
[2 replies] Last: Thank you, I figured out how to do it: void Sally::doInputString(S... (by annolliwohe)
return *this to a Date& operator++()
I would love to be able to get a deeper understanding of this code from the book & I will arrange in FACTS that I think I know vs QUESTIONS to facilitate. FAC...
[13 replies] Last: Hmmmm, but don't all pointers have addresses though? No. int x; &x d... (by jonnin)
Beginner C++ code will not compile in terminal
Hello, everyone; Apologies in advance--I am a very new C++ user, and I'm attempting to make a simple, fun code. Theoretically, the inter-actor can input inte...
[8 replies] Last: Hi @Andy, no worries; and thank you for the rework. I think the initia... (by phoenyxfeatherz)
by Baky
Very new to C++
Hello I just registered. I am very new begginer and I'd like to learn scripting starting from the scratch. What I want to ask you is as following, what should I...
[7 replies] Last: @seeplus I am running/writing the scripts with Microsoft Visual Studi... (by seeplus)
How to convert algebraic equations into C++
In one C++ Program translate the following algebraic equations into C++ code. Then run the program with the given values stated below for x and y. Make sure tha...
[7 replies] Last: And continuing on with the second equation. There are lots of opportun... (by againtry)
take different inputes within a array from user
SO i was writing a program to take input from user of the batting figures of the cricket team and display it latter using array .But after the first input i.e P...
[2 replies] Last: Hello Atharva k12, Thank you for using code tags. My questions to st... (by Handy Andy)
Linked List and Pointers in the if statements
Hi I am studying basic Linked List right now. I am reading a related book and got stuck in this line. if(!head) head = newNode; "head" is pointer that ...
[2 replies] Last: @helios ,Thank you so much for great logical explanation ! (by dntwk707)
Stuggling with structure for tracking all game items
Yes I'm writing a console text game and yes I know that the console is bad for games. No graphics and won't ever be distributed (probably). I'm also learning SF...
[10 replies] Last: and, I did not ask those for you to support it now, so much as 'what i... (by jonnin)
Division gets funny?
Hi guys, here I wrote a program to evaluate the integral of a given function. Something goes wrong when evaluating the parameter m_h of the class Integrator.hxx...
[13 replies] Last: "If it's on the Internet it must be true" -- Abraham Lincoln (by George P)
How To Set Min and Max For a Conversion?
Hi, everybody, I was working on a program where I have to convert Fahrenheit to Celcius but the degree in Fahrenheit can't be less than -60 or more than 200 but...
[6 replies] Last: SupremeFonzie, a bit of advice for the future.... PLEASE learn to us... (by George P)
writing flighting system
so i need to write a flighting system , ask name then what number between 1 - 5 and each number has a specific time, how would I write the loop for it to displa...
[17 replies] Last: ah sorry @AbstractionAnon I edited out for (int f = 0; f < MAX_FLIGH... (by Anonomys)
trouble changing values from a function C++
I've been learning to code for 3-4 weeks now using codecademy, i came to the end of a lesson where i need to refactor existing code using functions. tried to ad...
[6 replies] Last: Thank you Handy Andy! That rewrite made it much easier to see what wen... (by chadwillis19)
Base* pointer points to "new" derived class (1,2)
This chap in the book deals with polymorphism & I have commented out some of the lines from the book & modified it to see if it will work & it seems to work jus...
[21 replies] Last: The C++ Programming Language book is a reference - not from which to l... (by seeplus)
cin.getline with vector struct
Hello there, I have been working on this assignment for class where we have to convert to use an STL vector instead of an array. We also have to complete this...
[7 replies] Last: OK. Using vector: #include <iostream> #include <vector> using names... (by seeplus)
by kmce
string subscript out of range
I am trying to assign characters to a string. From what Ive read, a string is basically a c style array, so I think I should be able to do it the way I am, but ...
[6 replies] Last: If you need to use a for loop that accesses all the elements of a stri... (by George P)
by Kaega2
Const Char *variable vs Const Char variable[] and glShaderSource()
Hello Everyone, I really enjoyed programming in school and decided to try and pick it back up. I don't think I've ever fully understood pointers/references or...
[3 replies] Last: Thanks for the explanation Jonnin. I will take your advice Furry Guy... (by Kaega2)
int value changing when calling a function
I have created a queue using an array, and I have a function that returns the front value and also a isEmpty function. The front() function calls the isEmpty() ...
[4 replies] Last: Sorry for ignoring the answers for so long, I was away from my PC for ... (by DonnaPin)
Sleep() for a specific function?
So I have a loop that is running and (keeping a connection to the server). I want to send messages to that server in a (4) seconds interval wihout losing the co...
[5 replies] Last: text eds are often threaded now, mixed bag on those. quantum computer... (by jonnin)
string pointers?
Hello, I am trying to create a hangman type game. The word to be guessed is going to be picked from a text doc, and the user inputs a string (either a single ch...
[5 replies] Last: but was wanting to try and create it mostly without the use of stl me... (by seeplus)
August 2021 Pages: 1234
  Archived months: [jul2021] [sep2021]

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