
please wait
by admin
Welcome -- read before posting!
|
Welcome to the beginner's forum in C++.com! In this forum, users can to talk about any topic related to C++ for non-expert audiences. Feel free to participate... |
May 9, 2008 at 10:14am
[2 replies] Last: How To Answer Questions in a Helpful Way Be gentle. Problem-relat... (by admin)
|
by Zolaboony
Console Closing Down (1,2,3,4,5,6,7)
|
Hi, i am new to C++ and have just written my "Hello World" program. It worked all right but the console/cmd closes down instantly. If you tell me why it is clos... |
Nov 30, 2008 at 3:14am
[120 replies] Last: It displayed "Hello world" after you pressed Enter. int c is a ... (by Duthomhas)
|
by Ch1156
Is my understanding of pointers correct?
|
So I've been studying pointers and really trying to learn how to use them and how they work, and I feel like I completely understand their use cases now. I... |
Mar 26, 2025 at 2:18am
[19 replies] Last: I have just discovered that [ ] can be applied to type constructors ... (by TheIdeasMan)
|
by ElusiveTau
Getter for enum member returns a copy of enum?
|
I came across something non-intuitive, found a solution, but don't fully understand why the solution works. #include <iostream> using namespace std; enum ... |
Mar 19, 2025 at 2:32am
[11 replies] Last: My view with regard to interface and not needing setters and maybe nee... (by TheIdeasMan)
|
by Jonathan100
Using of voltile qualifier
|
Hi, Where should i use volatile keyword in cpp? I wrote a code in cpp which communicating with a memory mapped IO (MMIO) - specifically a IP core with base add... |
Mar 1, 2025 at 6:06pm
[3 replies] Last: [quote=ElusiveTau]In multi-threaded applications, volatile can be used... (by Peter87)
|
by Ch1156
Using std::variant to reduce getter and setter clutter
|
I'm experimenting with new ways to reduce code bloat, and one of my biggest gripes is always having to create two different functions for one variable, so my so... |
Mar 1, 2025 at 5:40am
[18 replies] Last: Just on the C++ language, IMO it does seem a pain that things take so ... (by TheIdeasMan)
|
by Coubarrie
C++ and the Government
|
Could anyone care to comment on the following? https://www.theregister.com/2024/11/08/the_us_government_wants_developers/ |
Feb 15, 2025 at 2:39am
[4 replies] Last: you use what the government tells you to if you work for them, directl... (by jonnin)
|
by Ch1156
Is this how you do object chaining?
|
Im learning about object chaining and im wondering if im doing it correctly. #include <iostream> #include <print> #include <string> #include <vector> ... |
Feb 8, 2025 at 4:35pm
[9 replies] Last: Thank you for all the replies! That seems like a straight forward conc... (by Ch1156)
|
by nowy20180820
Programming math - polynomial class
|
How to write templated polynomial class I would like to have overloaded operators like + -(unary,binary) * Here we can have school multiplication or... |
Feb 7, 2025 at 10:37pm
[8 replies] Last: A wouldn't make this a template, unless you need it to work with float... (by dhayden)
|
by Jonathan100
stack and heap
|
Hi, I have some programming concepts question: Why is stack (in context of stack and heap) considered LIFO (last in first out)? The last time i checke... |
Feb 4, 2025 at 1:19pm
[9 replies] Last: What question, exactly? Weren't here plenty of explanations ("solution... (by keskiverto)
|
by zzzhhh
Should the subscript "opt" be dropped in the definition of "array of N T" in the standard?
|
This is the definitive syntax of "array of N T" in C++ Standard https://eel.is/c++draft/dcl.array#1 : D1 [ constant-expression_opt ] ... I think the subs... |
Jan 20, 2025 at 12:03pm
[3 replies] Last: Hi Is it because the array bound may be omitted when there are initia... (by TheIdeasMan)
|
by zzzhhh
Where is const mandated in the Standard when binding an lvalue reference to an rvalue?
|
I'm reading the part of the Standard about initializing an lvalue reference from an rvalue (https://eel.is/c++draft/dcl.init.ref#5.3 ). I know a reference to co... |
Jan 12, 2025 at 10:10am
[1 reply] : I don't think I've ever actually read the standard in over 30 years of... (by seeplus)
|
by zzzhhh
Which item stipulates that A() is a prvalue?
|
class A { ... }; A(); This webpage lists all possible forms of prvalue expressions: https://en.cppreference.com/w/cpp/language/value_cat... |
Jan 4, 2025 at 5:33pm
[2 replies] Last: I believe that A() is a function-style cast expression and is covered ... (by mbozzi)
|
by ElusiveTau
How to compare int class template value?
|
I'm aware I should use std::string but this is question is about using template specialization a specific way. I'm learning about template specialization and ... |
Dec 31, 2024 at 12:16am
[2 replies] Last: 2. That's a good point. Only up to MAX_CSTR_SIZE-1 bytes will be copie... (by ElusiveTau)
|
by ElusiveTau
Template errors creating a map<int,std::thread> using map::emplace
|
I created a class to try out std::lock_guard. The first function, UnsafeExample compiles and runs fine. The second example, SafeExample does not compile a... |
Dec 19, 2024 at 3:25pm
[2 replies] Last: Thanks Peter. That was it. 1. std::ref(coutMutex) was necessary, for ... (by ElusiveTau)
|
by ElusiveTau
How to initialize base class member with subclass member?
|
I'm working with code where CustomThreadApi is not modifiable. CustomThreadApi has a ctor that takes a const char* . I would like to assign MyThreadClass.Nam... |
Dec 18, 2024 at 5:50pm
[2 replies] Last: baseClassBuff is unnecessary. I can just reuse MyThreadClass.Name .... (by ElusiveTau)
|
by Cyclone
Removing double quotes from Cstring
|
Hi, sorry its late... I am trying to do a few things with strings. - I need to remove double quotes from a users input - Then the string needs to be divide i... |
Dec 17, 2024 at 4:25pm
[8 replies] Last: You only get double quotes if some component of the filename path has ... (by Duthomhas)
|
by Shervan360
Are these ternary operators the same?
|
Hello, What are the differences between these? #include <iostream> int main() { int a = 18, b = 44, total = 0, total2 = 0; total +=... |
Dec 1, 2024 at 9:47pm
[8 replies] Last: I think some chips have a way to test a single bit but in general, I d... (by jonnin)
|
by Dazzer
How to start with audio plugin GUI design?
|
Hi folks, I'm interested in learning C++ for audio plugin design, but I'm a bit unusual in that i'm not really interested in the audio DSP part, i'm only rea... |
Nov 14, 2024 at 5:34pm
[1 reply] : we used to call it RAD (rapid application development) and I am not su... (by jonnin)
|
How to get program to distribute input by alternating between two, multi-line string inputs |
Hello I need to get this output: 1) type a: 1a type b: 1b 2) type a: 2a type b: 2b 3) type a: 3a type b: 3b 4) type a: 4a ty... |
Nov 13, 2024 at 12:47pm
[5 replies] Last: You can do it with just 1 loop to read the data. Consider: #include... (by seeplus)
|