Beginners - December 2019

by Miskok
c++ convert to oop(object oriented programing) (1,2,3)
Hello, I just want to have couple question about this code,. how to convert this code to oop(object oriented programing). please help me
Dec 31, 2019 at 10:45pm
[50 replies] Last: If you insist that OOP is a programming language Lucky me for not ma... (by againtry)
Function Exiting
Fellow programmers, I am requesting assistance on a small problem I am experiencing with this calculator program. I wanted the user to have the ability to...
Dec 31, 2019 at 7:21pm
[3 replies] Last: Hello john26999, Any time. Andy (by Handy Andy)
*this vs this in C++
Hello, I'm confused. I don't know what is differences between this and *this. If we use this in the below program we have an error. Thanks #include <iostr...
Dec 31, 2019 at 7:16pm
[8 replies] Last: If'n new-ish students are going to deal with memory management via poi... (by deleted account xyzzy)
Whats Wrong In This Code......HELP
Create a class Matrix and Write a C++ program to perform the following functions: a. To accept a Matrix b. To display a Matrix c. Overload unary minus „–...
Dec 31, 2019 at 5:31pm
[14 replies] Last: Looking at your most recent code: Line 2 should be #include <cstdlib... (by dhayden)
by ema897
Graph implementation with element of a class
Is it possible to implement a graph with object of a class? I mean, I made a class and it has many inherited classes, that have 2 pointers and another value. T...
Dec 30, 2019 at 4:19pm
[13 replies] Last: now, for the next error _x1 = &a; error: assigning to 'myClass *' f... (by ne555)
Different Types of Memory Allocation
As I said earlier(which you don't need to remember), I am looking to clear my basic doubts so that I can move to advanced stuff and our C++ instructor did not s...
Dec 30, 2019 at 4:07pm
[7 replies] Last: int i=4, *p; p = &i; this is completely different. here you have a p... (by jonnin)
C type strings Syntax check
Okay, I was making sure all of my beginner concepts were polished, (and so you will be seeing stupid beginner questions quite often), so I was playing around wi...
Dec 30, 2019 at 3:56pm
[6 replies] Last: This is hilarious(ly bad): char* s = ... char* name = new char[ strle... (by keskiverto)
No matching function
Hello everyone, I've defined two functions in a header and when I want to use them in my main, xcode recognize them, but when I initialize the arguments, xcode...
Dec 30, 2019 at 3:26pm
[15 replies] Last: Hello Emilien, It took a while, but I finally understood what salem ... (by Handy Andy)
by Lanh
Recursion
Hello everyone here ! I am new to this forum and I have a beginner's question about a simple recursive (Call by ref) function : x and y are int and x times y i...
Dec 30, 2019 at 12:56pm
[3 replies] Last: Thank you very much. It was just a little example I found using Call b... (by Lanh)
Simple Loop not blocking
Write your question here. I am trying to do a simple loop where the user can enter a command and the application fires off an event. My problem is that cin i...
Dec 30, 2019 at 5:31am
[10 replies] Last: For a thread you might decide to call 'thread_xyz' in main (say), afte... (by againtry)
Jumping game in C++
Hello, I want to create a jumping game with recursion in C++. I try to write code to solve the jumping game in C++ but I have a problem. Stack overflow (...
Dec 30, 2019 at 12:17am
[9 replies] Last: Didn't know there was an algorithm already made that I could have code... (by zapshe)
by Foxel
Problems with GoTo
I've coded in C++ since a few months ago and I often found people who recommended me not to use the much hated Goto ... But I haven't found any reason yet! I...
Dec 29, 2019 at 4:50am
[10 replies] Last: > Is it a problem if I cross-post to get an answer earlier? http://w... (by salem c)
Xcode GLFW DYLIBS
Hi I'm working with Xcode and I am having problems with the dylib. I'm trying to add two dylibs to XCODE 11, glfw is one of them The other is glm_shared. They...
Dec 29, 2019 at 1:25am
[1 reply] : https://stackoverflow.com/questions/42022884/making-xcode-embed-necess... (by againtry)
by ingo
array of functions in class->undefined reference
Building upon http://www.cplusplus.com/forum/beginner/4639/ I tried adding it to a class. Keep all functions private and have just one public function to access...
Dec 28, 2019 at 5:54pm
[2 replies] Last: Thank you. A few changes that are obvious in hindsight and the 'big on... (by ingo)
Point to char confusion
I am very much confused by the following code. #include <iostream> int main() { char c = 'b'; char *ptrChar = &c; std::cout << ptrChar << '\n' ...
Dec 28, 2019 at 2:40pm
[4 replies] Last: #include <iostream> int main() { char c = 'b'; char* ptrChar... (by againtry)
Instantiate an Object
Hi coders, I am learning c++ and would like your help in understanding the difference between eg., tcpsocket *socket = new tcpsocket & tcpsocket socket ...
Dec 28, 2019 at 6:54am
[1 reply] : > the 1st expression in my novice opinion is a pointer of type tcpsock... (by JLBorges)
Learning classes
I am trying to learn how to use classes, the course I am learning from is in java but I am trying to bring it over to c++ since i think it will be more useful, ...
Dec 28, 2019 at 4:36am
[3 replies] Last: http://www.cplusplus.com/forum/beginner/266596/ (by againtry)
3 for loops for multiplying arrays
Hi all, I'm working on a program that uses two arrays - the first array is 2d and has two columns of numbers. I'm supposed to populate the second array by mult...
Dec 27, 2019 at 8:14pm
[6 replies] Last: dhayden, Thank you for simplifying things for me. I had a feeling I... (by closed account 1Ck93TCk)
How does std::list::swap() do this?
I just discovered this peculiar behavior of std::list that I don't completely understand. Lets assume I have the following code: std::list<int> a; ...
Dec 27, 2019 at 6:28pm
[4 replies] Last: but I fail to see the rationale. Something to do with the allocator.... (by dutch)
Dynamic array (1,2)
Hi, so the user has to type the numbers in the array, then the program has to find the largest number in the array, then half it and here is an example: if the...
Dec 27, 2019 at 4:44pm
[30 replies] Last: @izlezotfilmabrat, What was your intention if the largest element of t... (by lastchance)
December 2019 Pages: 123... 13
  Archived months: [nov2019] [jan2020]

This is an archived page. To post a new message, go to the current page.
Registered users can post in this forum.