Beginners - July 2022 (Page 5)

by Geckoo
Sort objects vector according to player position
 
Hello everyone. I would like to sort an vector with objects which I know their position. I have my inline function to compute distance, but I don't understand h...
[8 replies] Last: For efficiency, sort on distance-squared, not distance. You will get t... (by lastchance)
Can't bind "this" to a const object
 
I'm reading C++ Primer by Lippman, about the this and const member functions. I understand that this is a top-level const pointer that refers to the (non-co...
[3 replies] Last: Thanks for the elucidating post mbozzi, seeplus. I think I understand.... (by ElusiveTau)
No default constructor exists for class "Shader"
 
Hello, I am having an issue with one class, which has been giving me this error: "E0291 no default constructor exists for class "Shader"" I am confused because...
[2 replies] Last: Ah, it worked! Thank you very much, I was about to give up on this. (by CPCoder)
double free or corruption (out) when file.close() is reached
 
the code below is part of a library I am implementing. Either the library and the executable using this library are build with no errors or warnings, but when I...
[11 replies] Last: Which line is line 32? I'm asking because I don't think you have poste... (by Peter87)
Palindrome program
 
Write a program that reads a word into a C-string (a character array). The program should then determine whether the word would be a palindrome if we remove the...
[11 replies] Last: Adding for first letter to the end The exercise as given by the OP i... (by deleted account xyzzy)
How to map/copy complex array of pointers to Eigen matrix?
 
I am able to both copy and map array of pointers to an Eigen vector/matrix and vice versa as the following: //Example 1: std::vector<double> xl(nx+1); ...
[6 replies] Last: @mbozzi np, I appreciate the help! (by JamieAl)
Need some editing on code
 
So basiclly I need to ask user what book he is reading. and then when he types it , it must display like this What Book are you reading? Learning with C++ (Us...
[3 replies] Last: #include <iostream> #include <string> using namespace std; int main... (by seeplus)
July 2022 Pages: 1... 345
  Archived months: [jun2022] [aug2022]

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