Beginners

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...
[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 console/cmd closes down instantly. If you tell me why it is clos...
[120 replies] Last: It displayed "Hello world" after you pressed Enter. int c is a ... (by Duthomhas)
by Ch1156
Console game missues
 
Im trying to implement some of the stuff i learned into a program and I am having an issue getting it to work correctly for some reason. I put the issues at the...
[12 replies] Last: Have a look at Hunt The Wumpus SA: https://cplusplus.com/forum/gene... (by mbozzi)
Different behavior when implemented in a Class method or as a standalone.
 
The following method is used to store content into the database: BasexClient& BasexClient::addRawInput(const std::string & Add, std::vector<std::byte> &To) { ...
[7 replies] Last: std::bad_alloc is used to report that a memory allocation failed. This... (by Peter87)
new window form a Win32 API in the program
 
i wanne open a new window whit a push of a button. ---------------------------------------------------- i tink i need t do that whit createWindow but don't ...
[4 replies] Last: i add 2 int WINAPI and a callback. and the problem is sloft. (by nvthielen)
by jNc
how to return 2d array?
 
Know how to return 1d array, can not find solution for 2d array Cant use vector
[13 replies] Last: #include <iostream> #include <algorithm> template<typename T> class... (by seeplus)
Mathematical help with midi pitchbend :)
 
Hey everyone, For an application in Juce framework I'm looking to calculate pitch from a notenumber and pitchweel value. Let's say i have a midi note of 36 (C2...
[3 replies] Last: careful, those sounds may be radioactive :) (is bad pun on pitchblend... (by jonnin)
how to pass one element of an array only
 
Hello everybody, I know how to pass a complete multidimension array to a function, but how can I pass one element only of a multifunction array to a function...
[6 replies] Last: @allenmaki, you have been given code for 2-d arrays (not that the func... (by lastchance)
Unable to increase the precision in computing square root using bisection method.
 
Tried to code bisection method to compute square root of 2, till the difference between two consecutive steps is less than some specific value, say 10^{-11}, wh...
[11 replies] Last: How many digits would you like? #include <iostream> #include <vector... (by lastchance)
expression
 
I studied in reference book that Any arrangement of variables, constants, and operators that specifies a computation is called an expression. I also studied tha...
[14 replies] Last: Yes, that's correct. In the statement cout << "the result is" << numbe... (by maxim2511)
inheritance confusion
 
Hi guys, assume I have a parent class which is supposed to be abstract in the sense that any running program would only run a child class that inherited from...
[19 replies] Last: Yes, this is definitely possible. In fact, this is a classic example o... (by maxim2511)
Library source code of: sqrt.c
 
Request some inputs to kickstart into understanding, as what is implied by the code as at: https://opensource.apple.com/source/Libm/Libm-47.1/ppc.subproj/sqrt....
[3 replies] Last: The code you linked to is the implementation of the square root functi... (by maxim2511)
by jNc
using infinite loop with epoch chrono method to get timestamp, cpu heats up to 90 degrees
 
Code below: auto miliseconds = duration_cast(system_clock::now().time_since_epoch()).count(); bool todayDayStamp = false; miliseconds = duration_cast<...
[2 replies] Last: If you want to get the timestamp continuously in an infinite loop with... (by maxim2511)
by Ch1156
SFML Help (Math calculation help) (1,2)
 
So im working with SFML and im just messing around with it and learning, and im trying to figure out how to place the corners of 4 squares on the corners of the...
[30 replies] Last: To prevent the player from colliding with the square using Axis-Aligne... (by maxim2511)
user invalid input
 
hey guys im trying to make the user to loop only with the option of y/n only if ever the user pressed a number or another letter it would say invalid only choos...
[2 replies] Last: now it works thank you (by gabzz29)
; missing before cout
 
The following code gives me error "expected ';' before 'cout'. if (select == 'A' || select == 'a') cout << "You are in car care \n\n"; else...
[7 replies] Last: If you don't already know of it, have a look at: https://www.learncpp.... (by seeplus)
c++ void
 
there seem have a problem at line line 28,64,66 #include <iostream> using namespace std; void concatonate(){ string first,second,third,all; ...
[4 replies] Last: Without knowing the exercise requirements, consider something like: ... (by seeplus)
by Ch1156
C++ Questions
 
I'm going to put all my questions about C++ here in this thread from now on so i have a handy and easy place to access them for reference as i read through and ...
[10 replies] Last: Thank you for the responses, ive decided to use std:: for now. (by Ch1156)
brackets
 
So I'm wondering why i can't use normal bracket when initializing a constructor in my header file? //works juce::ValueTree fullTree{"Fulltree"}; //Doe...
[8 replies] Last: class Sample { int x {42}; int y(7); // error }; int z(3); ... (by seeplus)
Accessing socket that is created in another Class
 
My project uses this structure: BasexClient.h class BasexClient { public: BasexClient (const std::string, const std::string, const std::string, const std...
[18 replies] Last: Good luck! :) (by seeplus)
Pages: 123
  Archived months: [jan2023]