Beginners - March 2023

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
[12 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...
[2 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...
[5 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...
[10 replies] Last: How many digits would you like? #include <iostream> #include <vector... (by lastchance)
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)
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...
[28 replies] Last: Im trying to just prevent the player from colliding with the square, I... (by Ch1156)
; 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 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<...
[1 reply] : Let the CPU sleep for a while on each iteration. https://en.cpprefere... (by Peter87)
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....
[2 replies] Last: hmm. Wonder whats in that table. I'd have said shift right half the ... (by jonnin)
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)
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...
[18 replies] Last: Besides, what you have shown could essentially be written: #include <... (by keskiverto)
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...
[13 replies] Last: cout is also the expression? how? In addition to what @seeplus ment... (by mbozzi)
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)
passing 2d array as argument
 
Hello. I am trying to do what seem to be simple task- I have an 2d array and i pass it as argument to a function [c++ code]. Array in main: #define Words...
[3 replies] Last: > I wonder what is the difference now? Dunno, I wasn't watching you ed... (by salem c)
Initialize array of arrays
 
Hey, I don't know how to copy values from an array into an array of arrays, what am i doing wrong? I have an array of bools, now i want to create 8 of them Thi...
[15 replies] Last: Tx again! (by wimvandenborre)
new/delete exception
 
This example was intended to throw an exception by allocating more memory than is available, but instead it succeeds. sizeof(*pointer) = 4 (size of 1st int ...
[7 replies] Last: > Do you guys really assign a pointer to NULL & back to NULL after del... (by JLBorges)
by Ch1156
Is sizeof useful in modern C++?
 
Im just re reading through some material and im wondering, is the sizeof operator useful in modern C++? I could see how it could probably be useful back in the ...
[3 replies] Last: It is required in some situations; for instance for implementing a cus... (by JLBorges)
March 2023 Pages: 12
  Archived months: [feb2023] [apr2023]

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