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
[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...
[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...
[8 replies] Last: If'n new-ish students are going to deal with memory management via poi... (by George P)
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 „–...
[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...
[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...
[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...
[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...
[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...
[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...
[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 (...
[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...
[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...
[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...
[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' ...
[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 ...
[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, ...
[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...
[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; ...
[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...
[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.