Beginners (Page 7)

error: cannot convert 'LPCWSTR' {aka 'const wchar_t*'} to 'LPCSTR' {aka 'const char*'}
hello i am trying to do an file finder but i took this error i am new in c++ how could i fix this pr...
[11 replies] Last: @seeplus, I tried using "Unicode" (the default) and "Multi--byte" enco... (by George P)
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)
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)
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)
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)
Writing a function
Write a function, computePrice that receives two parameters: the first one is a character variable i...
[2 replies] Last: thanks , So I was kinda on the right track at the beginning (by blackpanther35)
NumDays Class
Essentially I was creating a class called NumDays where I convert the number of hours into a day...
[4 replies] Last: The pre-inc/dec operators are still not as expected by convention. pre... (by seeplus)
issue with a loop and maybe sentinel?
My instructions were to make the program run until a sentinel was entered, in this case my sentinel ...
[11 replies] Last: It's easier if you make input as a function: #include <iostream> i... (by seeplus)
by kingsy
Newbie - Tips needed
Hi, I am new here. Just started learning C++ out of interest. All helpful tips to succeed in this...
[4 replies] Last: Thank you seeplus. That was really insightfuil. (by kingsy)
Find the right root
Hello everyone, may I ask that given size, nodes and edges of a tree. How can I find the correct nod...
[14 replies] Last: Greetings, thank you for your help, solved now. (by satsat111)
Segmentation fault in code
Good morning. I'm new to programming and need some help. I'm getting segmentation fault in the if st...
[14 replies] Last: keskiverto thank you for your help, but the code is now fixed. I corre... (by plastic)
C++ Oscillator not confirming finding sound source or emitting wave
I'm trying to follow along in a tutorial of how to code to an oscillator on youtube. Idk if I can li...
[3 replies] Last: A meta-search link might be helpful to find easier to use ideas. http... (by George P)
Pages: 1... 5678910
  Archived months: [apr2022]

Cannot post in this page. To post a new message, go to the first page.