Beginners - September 2022 (Page 4)

Unexpected behavior!
 
Consider the code below: using namespace std; int max(double a,double b) { cout << "You won't see me" << endl; return (a<b)?b:a; } int m...
[8 replies] Last: Hi You should make a habit of putting your own code in it's own names... (by TheIdeasMan)
by Geckoo
cast a value
 
Hello. According to the next code, it seems that we have two alternatives in order to cast a value. But which one is the best practice? #include <iostream> ...
[16 replies] Last: That is actually a good point — and a point of confusion to the unwa... (by Duthomhas)
Char array to dynamic char array
 
I have an assignment question that requests that i take my code where i have declared a normal char array and change it to a dynamic char array but when my code...
[19 replies] Last: // https://en.cppreference.com/w/cpp/string/byte/toupper#Notes for ( ... (by JLBorges)
Program with dynamic char array just skips past function call
 
This is an assignment question, i had to include a dynamic array in the below program. Since i have included the dynamic char array it skips past the function c...
[15 replies] Last: [see also https://cplusplus.com/forum/beginner/284775/ ] (by seeplus)
How to compile C++ 20 Modules Program using Visual C++ 2022 please
 
Following Visual C++ 2022 C++ 20 modules example program from C++ Professional 5th edition by Marc is giving following error: C7612 Couldnot find header iostre...
[6 replies] Last: M'ok, let me give you an example of what I mean, an example from the "... (by George P)
Need Help Compiling GUI C Program using Visual C++ Please
 
I need help compiling open source G Predict Satellite Tracking C program using Visual C++ 2022 Community edition please. On Google, searched for Github Gpredic...
[8 replies] Last: Thank you so much, Duthomhas, for the detailed steps about installing ... (by AlexCantor)
Questions about types (1,2)
 
Hello, I spent 4 days trying to wrap my understanding about types, but It seems I am hitting a big fat wall of frustration. I used to know that char is not n...
[23 replies] Last: Understand. Thanks ++ (by Geckoo)
by Geckoo
Noobs' questions (1,2)
 
Hello. I would like to start a thread with some noobs' questions. I ask myself about these points, promising to myself to do some search, and finally I forget t...
[22 replies] Last: ADL works by having all the necessary stuff in scope . The trick is t... (by Duthomhas)
Insights into c++ code
 
Has anyone used C++ Insights and do you trust the GitHub code? It is pretty helpful that it can take a variadic and break it down to what the compiler is actual...
[14 replies] Last: Has anyone used C++ Insights I've used the on-line version on test... (by seeplus)
Streams and terminals!
 
In one of his answers @Peter87 wrote: Streams are often "buffered", meaning that instead of writing the output to the destination straight away they often stor...
[4 replies] Last: Note that whilst you might want explicit buffer flush for cout (eg std... (by seeplus)
How bool is stored in memory (1,2,3,4)
 
I got that int is stored like: 01000100 01000110 00101101 00110001 char like: 00110001 and double(4 bytes) like: 0 10001000 1000110 00101101 00110001 ...
[60 replies] Last: @Peter87, I will give you 5 stars for this reply))))) And with even m... (by ninja01)
September 2022 Pages: 1234
  Archived months: [aug2022] [oct2022]

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