Beginners - July 2021 (Page 5)

How to extract the n-th dimension of a multidimensional array?
 
Let's say I have a multidimensional array, for instance: unsigned short arr ; How can I e...
[2 replies] Last: There is std::rank which returns the number of dimensions and std::ext... (by seeplus)
C++ pointer and struct
 
Hi all, I am a Computer Science student who just started C++. I am on struct right now. I got an err...
[3 replies] Last: Thank you so much, I changed the code according to your advice. It see... (by dntwk707)
12 Hour Clock Displays Incorrectly after 11:59:59
 
I have program that outputs a 12 & 24 hour Clock side by side with a users options menu to allow use...
[7 replies] Last: Driving home Dutch's point, if you record the seconds since midnight t... (by dhayden)
How to deal with frustration?
 
Salutations all, as you could tell by the title of this topic, I'd like some advice on how to deal w...
[12 replies] Last: @OP, to me it sounds you want to learn too many different things at o... (by thmm)
asm to c++? (1,2)
 
I have this code in asm that I'm debugging: //no type checking here. mov ebx, dword ptr ds: //a ...
[37 replies] Last: Thank you, that explanation is very clear. (by Banzuki)
can anyone help? I need ASAP.
 
#include<iostream> #include<iomanip> #include<cmath> using namespace std; using std::setw; using st...
[4 replies] Last: I see you haven't fixed line 39 as I pointed out in my forum reply. L... (by AbstractionAnon)
Where did i do wrong?
 
So im trying to get better in this thing but i dunno what i did wrong, it lets me write in the firts...
[2 replies] Last: When you as user type the number, you do type 'Enter' too, don't you? ... (by keskiverto)
getline not working for converting a string to a vector array
 
I am trying to convert a string from getline into a char vector but the size is 0. I am sure that I ...
[2 replies] Last: What comes BEFORE the snippet of code you have shown? Show COMPLETE, ... (by lastchance)
Access typedefs of template class without template parameters?
 
Hi I have something like the below code: #include <iostream> using namespace std; template <ty...
[1 reply] : Something I like to do especially if the template arguments are compli... (by AbstractionAnon)
C++ - Access to private member from inherited class
 
Hello, I have two classes, Person and Student. Person class: int id; string name; int ag...
[3 replies] Last: So make age protected. class person { private: int id {}; string n... (by AbstractionAnon)
by Hyung
How to compare value in a file with many row ?
 
I have a file that has 3 columns with many rows. I want to compare the value either increase or decr...
[2 replies] Last: Hello Hyung, Watch your indentation. Not only is what you post poor i... (by Handy Andy)
struct within class template - linked list
 
Hello, I am making a linked list and using a class template, and within the class I have a struct fo...
[9 replies] Last: OP's mistake seems to be that the template is implemented in a separat... (by mbozzi)
Force C++ to move out of an object when invoking external C function that takes object by value
 
I have a C function in a DLL that takes an object by value. I am trying to generate C++11 bindings f...
[4 replies] Last: The implicit object parameter of a member function that moves from *t... (by mbozzi)
Constructors and classes
 
This is a simple program describing two classes- a point and a vector using the point as datatype. I...
[4 replies] Last: On the first post replace line 14 with point start{0.0, 0.0}, end{0.0... (by thmm)
class template question?
 
I am reading a book and it gives an example of a class template, but doesnt talk it through, so hopi...
[5 replies] Last: Based upon original code, consider: #include <iostream> #include <v... (by seeplus)
by dvdlly
Basic VM code wont compile
 
I am building a basic VM and my code will not compile, get the error "In file included from Main.c...
[5 replies] Last: Seems fine on clang as C++14 and 17. One thing ... If you're using <c... (by kbw)
Create and array with random numbers and strings
 
How do I create an array with random numbers and strings? sample output is: 100001, wtfxltnqbkviye,...
[11 replies] Last: One way to produce the random data and the top 5 high and bottom 5 tot... (by seeplus)
How do I make a line?
 
How do I make a line? I cannot wrap my head around the "setfill()" function. I just want to make...
[3 replies] Last: Thank you! All I could find online was crazy functions or graphics to... (by Fayezilla)
why dosnt it print the backslash
 
well im trying to build a street with code and im very new but why dosnt it print the backslashes, i...
[1 reply] : You need a doubl backslash in the code to output a single backslash. S... (by coder777)
Help me
 
so im very new to this stuff but that \n should put it in the next line and all but if i write this ...
[1 reply] : You need to add another backslash to the last backslash then in should... (by coder777)
July 2021 Pages: 1... 34567
  Archived months: [jun2021] [aug2021]

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