Beginners - May 2019 (Page 3)

How to use graphic.h
I need to know a code about graphic.h pls tell me what to do tnx, Anddd my classmate said that i need a software or something to e able to use graphic.h i...
May 27, 2019 at 11:13pm
[17 replies] Last: ARgggggggggg i wishhhhhhhhhh i learnnnnnnnnnn lot of stuff btw thanks... (by CoolAvocado)
by hixtus
Union-Find Algorithm (Finding Cycle) Without Using Malloc
Hello! I've been advised that using malloc in a c++ program shouldn't be done. How can I convert this to a non-malloc code? Thank you! https://www.geeksfo...
May 27, 2019 at 9:59pm
[3 replies] Last: That code looks like plain C rather than C++. Step 1 is to understan... (by keskiverto)
by Qikee
How to read from file (const problem)
Hello. today I tried using std::map and std::isalnum and I ran into a problem where I do not know how to get text input from a file , tried using string but it ...
May 27, 2019 at 8:47pm
[2 replies] Last: Thank you very much ! (by Qikee)
Output of char
Why does std::cout automatically convert the char variable I defined into the corresponding int from ASCII table? For example, in the code below, variable test ...
May 27, 2019 at 3:00pm
[6 replies] Last: int(test) creates a temporary int, +test promotes a char variable,... (by deleted account xyzzy)
by lutein
Template class Matrix multiplication with operator overloading (Absolute Beginner)
After adding a matrix addition, now I am adding matrix multiplication. But It seems to be far difficult than addition. To sum up my question 1.How can I ...
May 27, 2019 at 11:28am
[3 replies] Last: @keskiverto, coder777 Thank you for answering the question. my matrix... (by lutein)
by aligh
Error in STL Random Generator program
I'm trying out the random generation facilities of STL. The following code produces a histogram for a normal distribution for 30 rows over 200 tries. It works,...
May 27, 2019 at 10:56am
[4 replies] Last: Thank you so much! (by aligh)
by mpg
Recursion problem with string (1,2)
Can you help me with these two problems with recursion? 1) I have a string : define the dimension 2) I have a string and a character: find the first position of...
May 27, 2019 at 8:39am
[23 replies] Last: std::string is an object that stores text, most likely in an array of ... (by keskiverto)
by kenken
Recursion Help
I am trying to write a power function using recursion but having some issues. Any help would be greatly appreciated. #include <iostream> #include <cmat...
May 27, 2019 at 4:12am
[4 replies] Last: #include <iostream> #include <cmath> double power( int base, int ex... (by JLBorges)
by sturk
Issue with scale function in class square
I've been trying to implement the void scale function in class square but still did not managed to get it. The scale function and radius function is required to...
May 26, 2019 at 10:03pm
[4 replies] Last: Playpro10, can you post the text of the assignment. It will help great... (by dhayden)
by broon
Can't seem to ever get the right movement function for 2048
Exactly as title says, can't seem to do it. Here is my code, if you want to try to help. I deleted my old movement function. Forgive me for my names. ...
May 26, 2019 at 7:35pm
[3 replies] Last: So... my deleted code wasn't entirely deleted for no reason. I had to ... (by broon)
by aligh
to reference or not to reference in function return type
I have the following class: class Person { public: Person(const string & name, int age): name{name}, age{age} {}; const string & getName() const...
May 26, 2019 at 6:09pm
[6 replies] Last: Yes, sure! Your explanation and the code snippet helped me think about... (by aligh)
by lutein
Question about Template class operator overloading (Absolute Beginner)
Here is my source code. It's a simple matrix class I want to implement + operator overloading for matrix addition. But this code is not work. I have no idea ...
May 26, 2019 at 4:14pm
[2 replies] Last: Thank you very much!, JLBorges. I will try to understand that code. Th... (by lutein)
add list using pointer
everything is fine, but when I add new node to list, the head and the tail both take that node and remove the old, why? #include <stdlib.h> #include <str...
May 26, 2019 at 1:45pm
[1 reply] : [quote=pnthoai123]everything is fine That's what the watchman on the ... (by lastchance)
by aligh
code compilation error using thread and mutex
I'm trying to learn the basics of threads, mutex and function objects. Here's my test code trying to output "Hello" and "World" by two different threads every s...
May 26, 2019 at 1:14pm
[2 replies] Last: Thank you @Repeater! Works perfectly. (by aligh)
by GSid
Bitwise operations
hi all i am having trouble with a problem which requires me to set a number to the bottom 4 bits and use the top four bits to count the number of iterations ...
May 26, 2019 at 4:19am
[4 replies] Last: combined = (counter << 4) | tL.q; gotta pay attention. Good luck! (by Duthomhas)
by sparki
Compilation error
I am getting a compilation error which I can't resolve on my own. Don't really know what to change really. Been stuck on this. Need your expertise on this pleas...
May 26, 2019 at 3:22am
[4 replies] Last: when you do `polygon ' you get a PointType `PointType' does not have a... (by ne555)
Valid Operations with Arrays
I'm on the part which shows valid operations with arrays, and this one is confusing me. What is the purpose of the nested bracket on the first part. What specif...
May 26, 2019 at 2:51am
[10 replies] Last: Ah, the tutorial. http://www.cplusplus.com/doc/tutorial/arrays/#access... (by Duthomhas)
For loop help
So this may be a very dumb question but I want to make that 650.0f go down by 490 everytime it loops. On first loop it being 650, second loop 160, third -330 an...
May 25, 2019 at 11:49pm
[5 replies] Last: Ah never mind, I just took the float value = 650.0; out of the loop s... (by zapshe)
by sparki
Class constructor compilation error
I am receiving a compilation error which I am quite vexed about at this point for my polygon constructor(Refer below). I would appreciate if anyone could help m...
May 25, 2019 at 6:44pm
[1 reply] : new Polygon::PointType ; This is an attempt to create an an array ... (by Repeater)
by sturk
C++ cannot call member function w/o object
Hi, I am getting a compilation error saying "cannot call member function ‘void Point::PointType(float, float)’ without object." I've tried adjusting the con...
May 25, 2019 at 2:51pm
[12 replies] Last: You still haven't explained what this code is trying to do. It's very... (by dhayden)
May 2019 Pages: 12345... 16
  Archived months: [apr2019] [jun2019]

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