Beginners - February 2020 (Page 12)

Detriangulation of Polygon
 
Let's assume you have the whole triangulated concave/convex polygon information stored in a container like a vector etc. and want to "detriangulate"=reverse tri...
[11 replies] Last: This is what I was looking for. Many thanks for this nice code :-) (by Bronislaw)
Determinant of a matrix
 
Hi, i want to find the determinant of a matrix. I know how to do it if it is a 3x3 matrix. if i have to take the size of the matrix by the user how am i going t...
[8 replies] Last: You can compute it by the same row operations as you would use for gau... (by jonnin)
by korede
classes and objects
 
Write your question here. ave tried to compile my code but the compiler keeps saying error: no matching function for call to 'GradeBook::GradeBook(const char...
[18 replies] Last: sorry for pesting you I'll figure it out myself ...tnx anyway (by korede)
C++ Program not giving complete output.
 
In this C++ program, I'm dealing with classes in a "general list" with x,y values, in the output, the x values are printing, but the y's stay as 0. I'm not sure...
[11 replies] Last: That did the trick, setting it to i-1 has it running I believe the way... (by Mopar75)
Too many initializer values
 
My current code right now is supposed to let you pick what class you want and display it and show the starting stats. However, when I try to assign the stats li...
[2 replies] Last: By that point in the code, attribute_points already exists, so you c... (by Repeater)
by hbcpp
Initialize a matrix like in the Eigen library!
 
I am planning on writing a Matrix2d class which will be fun for me and help me get a better grasp on matrices in linear algebra. The first thing I want to do...
[17 replies] Last: here is the full code, https://codereview.stackexchange.com/questions/... (by hbcpp)
by hbcpp
Gaussian-Jordan Elimination
 
I have created a program that solves the linear system by Gaussian-Jordan Elimination method. My program algorithm follows every step I was taught in school, s...
[9 replies] Last: @jonnin thanks. I will look them up. @ lastchance, I posted the full ... (by hbcpp)
by prachu
Error while creating notepad files.
 
I wanted to write a program where I can create text files with consecutive numbers, Following is my code for creating text files with the names "1.txt , 2.txt.....
[6 replies] Last: Regarding file-name sequencing, I wasn't thinking of the OS, rather of... (by Chervil)
unusual behaviour with gdb
 
When i use the step command in gdb instead of going forwared it jumps to different lines in gdb while debugging c++ code. i'm using cmake to build the code.
[3 replies] Last: So the upshot is to compile with -O0 -g (no optimizations, include d... (by dutch)
by mpg
Complexity calculation
 
I have problems with this .. For example: i=o while (i<n) { for (j=0;j<n;j++) {... printf ("hello"); .... } i=i+1 } The answer is= 1 + n+1 + n*(1+n+1+n+...
[16 replies] Last: For this? i=1 //1 while(i<n*n+1) // n^... (by mpg)
image size (1,2)
 
Hi, I'm trying to obtain the size in bytes of a picture, this is my code, but I keep getting the following error: error: expected constructor, destructor, or ...
[20 replies] Last: A dirent structure contains the character pointer d_name, which point... (by againtry)
by annw3y
arrays c++
 
I want to store numbers from 200 to 400 in array can someone help me how it is done?
[3 replies] Last: #include <iostream> using namespace std; const int how_many = 400 ... (by againtry)
Help with starting a gardening program.
 
Hello! First, I really appreciate any help you can give. I am tasked with creating a program to fit plants into a gardening bed. Here is the exact task below. I...
[4 replies] Last: Got it. I appreciate the help and as soon as I get a chance I'll look ... (by theforgottenone4)
by nickg
reading a large number of data points from file
 
I am trying to program a simple allometric equation calculating weights in grams from the natural logarithm of lengths in millimeters: logW = intercept + slope*...
[2 replies] Last: dutch, Thanks! That works. (by nickg)
Vector with tenplates
 
hey guys, regarding templates and vectors template <class T> class cls{ public: vector<T> vec(200,NULL); // error cls(){} }; template <class ...
[3 replies] Last: Good point. I should've instantiated the templates in main. I now adde... (by dutch)
Question about arrays of objects
 
So I've made a struct called cube (working on building a functional rubrix cube). I've made a 3d array of type cube. I'm all good to this point. I've popula...
[6 replies] Last: If I'm sending an array to a function do I still need to have it be pa... (by jonnin)
by annw3y
c++ input/output files
 
Hey guys, i have got a huge problem with input/output files in c++.. So i can't find program which reads from a file and prints out the largest string in anothe...
[3 replies] Last: Hello annw3y, Your original question and code refer to an input file.... (by Handy Andy)
trouble reading input (1,2)
 
nevermind
[27 replies] Last: @coder777 Respect - bullshit. In each and every case they started it a... (by againtry)
Using pointers within a swap function
 
I need help with using pointers to create a swap function. I am given a main #include <iostream> #include <fstream>
[11 replies] Last: a struct or class is a user defined type, as is a typedef/using etc. ... (by jonnin)
question regarding user input of objects and storing them dynamically
 
Basically my code is supposed to take in money objects such as 2.54, 3.05 and keep going until user types in 0.0. After, it finds the sum of all the objects and...
[5 replies] Last: Why not: bool operator<(const DollarAmount& arg1, const DollarAmount... (by dutch)
February 2020 Pages: 1... 10111213
  Archived months: [jan2020] [mar2020]

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