by admin
Welcome -- read before posting!
Welcome to the beginner's forum in! In this forum, users can to talk about any topic relate...
[2 replies] Last: How To Answer Questions in a Helpful Way Be gentle. Problem-relat... (by admin)
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 cons...
[120 replies] Last: It displayed "Hello world" after you pressed Enter. int c is a ... (by Duthomhas)
Has anyone seen this before?
Hello, I am studying the Bjarne Stroustrup Programming Principles and Practice Using C++ (Second Edi...
[9 replies] Last: [quote=Ynotnow]I'm a bit surprised the book didn't mention that fact. ... (by George P)
by Pen72
Hi everyone, This problem is very tough for me, would be glad if there's any advice to solve it prop...
[19 replies] Last: Hello, thanks for all the replies. Yeah seeing one problem from differ... (by Pen72)
measure execution time - always zero
Greetings! I experience some weird behavior when measuring the execution time of two loops. On my l...
[9 replies] Last: A millisec is a long time in the environments I work in, and I don't e... (by kbw)
STL stack: Does calling stack.pop() invalidate object?
This is from a Leetcode binary tree traversal exercise. /** * Definition for a binary tree node....
[6 replies] Last: Had to check for myself Awesome! You figured out a way to test a cla... (by keskiverto)
Why isn't TreeNode destructor called?
Question in the title. I was expecting some cout output before main() exits but nothing gets printed...
[3 replies] Last: and delete isnt really a function. its delete x; or if its a block ... (by jonnin)
Pushing Back Class Objects to a Vector
Here, in the code. While I'm pushing back that obj2 to vector, is it creating another class object? ...
[11 replies] Last: You normally don't pass a std::unique_ptr to a function unless it dea... (by George P)
by Geckoo
Play a wav data Hello community. I hope that all is good for you. ...
[9 replies] Last: That link to libsndfile is a bit outdated, here's a link with newer li... (by George P)
Call to Overloaded Function is Ambiguous?
Specifically on line 9. //John 3 #include "MathVector.h" #include <iostream> int main() { ...
[2 replies] Last: The code you posted seems to give: In function 'int main()': 132:27:... (by keskiverto)
How to select number format when writing to file
I'm modifying someone else's longer code for work, and I'm very new to C++. I have this section wor...
[8 replies] Last: I can print it to the terminal screen this way: printf("UO_Slope %e\... (by thmm)
Smaller c++ questions
I am going to be reviewing my C++ from scratch and will have smaller and sillier questions. Instead ...
[8 replies] Last: This article may be of interest: (by seeplus)
what does this small line of code mean?
I don't think you can make a string stream == to something, so I'm wondering what function, this lin...
[2 replies] Last: The "long" from of the very same code would be: std::stringstream tem... (by JLBorges)
Coin Flip Script
Hello I'm new to c++. I was wondering if someone here could do me a favor potentially. I'm somewha...
[14 replies] Last: If you throw a coin 10 million times the probability of getting exact... (by lastchance)
by jNc
get columns quantity for each row of array
Greetings! I have some data included in array with 100 rows and 100 columns. i need to roll thr...
[16 replies] Last: You could just have a regular 2D array with a maximal number of availa... (by Duthomhas)
Can you create an instance of a class using a variable?
Duplicate of
[no replies]
Creating Class Objects and Pushing Back to a Vector
Here I wrote some wrong code to tell my problem. I want to create a class object and at the same tim...
[4 replies] Last: For JLBorges, thanks for your kind suggestions. I still don't know abo... (by bydrachen)
Is it normal that smart pointers can't solve a problem?
Hi! I was wondering how normal it is that a problem can't be solved with smart pointers? On my curr...
[4 replies] Last: A better question might be: "Is it normal that pointers can't solve a ... (by George P)
Character/ASCII - Question
I am fairly new to C++ and still learning. I understand the first code is casting a char into an...
[4 replies] Last: as a side note, char is already a 1 byte int. cout is 'smart' and pr... (by jonnin)
A beginner's class and assignment. May a little bit help?
Hi! Currently, I'm learning C++ classes and object oriented programming. It's hard for me to learn b...
[3 replies] Last: Thanks for your kind suggestions jonnin and seeplus. I tried to apply ... (by bydrachen)
Pages: 123... 11
  Archived months: [mar2022]