Beginners - April 2024

by Ch1156
When to use const class member variables? (1,2)
 
So while doing something, I made a member of my class const, and i got errors, upon some cursory research I found i need a copy constructor, and to define my ow...
[21 replies] Last: Ok, so its perfectly ok to use static const, and to make it non copyab... (by Ch1156)
lest shift an u8 array
 
Hi. I have an exsiting u8 array in a function (function that get u16 array as argument). How can i create a new u16 array the starts from 3th byte of an existi...
[2 replies] Last: what you had is probably close. remember that c++ starts at zero. th... (by jonnin)
const keyword in function declaration
 
#include <iostream> #include <iomanip> using namespace std; const int NUMCOLS=4; const int TBLlROWS = 3; const int TBL2ROWS = 4; void showArray ( const...
[2 replies] Last: thanks buddy (by hassan236)
size_t implicit conversion
 
Greetings! I have a loop that doesn't want to break when it should. for (int i = Xdata.size() - 1; i >= Xdata.size()-B; --i){ // loop body ...
[17 replies] Last: I swear I’m getting senile. I'm getting there first. :|... (by deleted account xyzzy)
  Archived months: [mar2024] [may2024]

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