General C++ Programming - January 2020 (Page 6)

identifying parameters
 
are there any parameters in this program (i dont think there are bc it is int main())? if not, how c...
[2 replies] Last: #include <iostream> #include <iomanip> using namespace std; int m... (by againtry)
Validate input parameters before pass to the function or in function body?
 
Hi All, Validate input parameters before pass to the function or in function body? e.g. in bel...
[4 replies] Last: I agree with the above. Typically I have a small handful of extremel... (by jonnin)
Hello Guys! (1,2)
 
Im currently practicing coding hmmmm.. i dont know what went wrong here im just practicing using yo...
[22 replies] Last: :( not (by againtry)
Area of a rectangle
 
Hi. I am trying to calculate the area of a rectangle with x and y vertices. The program should finis...
[11 replies] Last: Just solved the problem:) Thanks for your help #include <iostream> usi... (by yabi2943993)
searching a vector of objects (1,2)
 
hello devs i have a vector which was populated with information from a text file, //text fil...
[25 replies] Last: @lastchance thank you very much you're a lifesaver xd, it is now worki... (by blendero777)
let c++ have static_assert without interruption
 
how can we make c++ have static_assert without interruption or disruption, simply instead skipping i...
[5 replies] Last: I imagine (a variation on) the pattern @JLBorges demonstrates will be ... (by mbozzi)
by koce
template class template parameters
 
Hi guys! I am experimenting with a template Binary_Heap class, initially like this: template <cla...
[5 replies] Last: Awesome, thanks, man! (by koce)
affine texture mapper problem
 
I am trying to write an affine texture mapper for my software renderer and it seems to work but not ...
[1 reply] : ¿how are you computing 'u' and 'v'? the band fighting may be a precis... (by ne555)
by volang
Pointers within the same range/memory block
 
In some cases, after incrementing pointers I want to make sure that the pointer is still within its...
[7 replies] Last: you should always know how big a pointer is. If you allocated it, you... (by jonnin)
by volang
Char pointers assign
 
Hello, hope you all are doing well! How do I make "a" ("a" is inside another function) equal to "...
[7 replies] Last: I tried std::string for images/videos, which didnt work String is de... (by dhayden)
by aster
avoid use of malloc/free on a function
 
Hello, A few month ago i made a function (thanks to the help of the forum) that take a char string ...
[5 replies] Last: Since you don't manually allocate memory, yes. However just being mem... (by jlb)
by aster
function works if called once, memory leak if i call it again
 
EDIT: my bad the problem was not inside the function Hello, a few months ago i wrote here for ...
[5 replies] Last: Well, ok, I feel embarrassed for this. This line in ArrOfArrs::double... (by Enoizat)
by H00G0
Error trying to pass function as argument
 
Hello! I'm having a problem passing a function as an argument, to another function. Consider the f...
[10 replies] Last: You can't have it both ways. If the function interacts with a (non-st... (by H00G0)
I am trying to create a following code with the information below.
 
How would this be written with the following information: Create a Person class. This class has th...
[3 replies] Last: #include <iostream> #include <string.h> using namespace std; class ... (by shanno8)
Kaprekar constant
 
Hi, I am trying to make a program, which calculates how much steps are necessary to get to the Kapre...
[3 replies] Last: FIrstly, learn to use code tags to post code! You probably just need ... (by dutch)
by ruzip
Deleting and Freeing an Array of Structs/Objects from Memory
 
How do I free and delete an array of structs/objects from memory? I tried free and delete , but t...
[16 replies] Last: Yes, I got it now that is why I decided to just to delete and reset th... (by ruzip)
by Ganado
Nice
 
Edit your post and add [co de] and [/ code] around your code and output to format it. https:/...
[3 replies] Last: I'm glad he/she got the answer they wanted. It's over to the teacher ... (by againtry)
Output problem
 
Hi, I have the following code: #include <iostream> using namespace std; int main() { in...
[5 replies] Last: Ok, thanks lastchance (by yabi2943993)
Output problem
 
I have a program which takes an input for a case, then makes the output and if the input is 0 it sto...
[5 replies] Last: Thanks to all for your help. For those who asked, why I want to do suc... (by yabi2943993)
Factory can't access friend's constructor
 
I have a factory: class FordFactory : public ICarFactory { public: FordFactory() { } ~Fo...
[8 replies] Last: > It's make_unique that seems to have trouble accessing the protected ... (by JLBorges)
January 2020 Pages: 1... 456789
  Archived months: [dec2019] [feb2020]

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