General C++ Programming (Page 2)

Should arguments always be passed to functions or can variables outside of the scope of the function be used in the function?
 
I have a function that will only be used in the software I am making. It's in the .cpp file containi...
[15 replies] Last: > But mostly it's just an alternative; some people like that the stati... (by JLBorges)
for loop question
 
Hello , I try to get 25 data from a can bus in the same time using a Qt/c++ application. So in eve...
[2 replies] Last: some minor stuff: Indents are off, see 117 and 119 for example of brac... (by jonnin)
by kbz8
Writing square root in cplusplus
 
Hi, square root is in math.h (C include) or cmath (C++ version of math.h) and is a function named sq...
[2 replies] Last: Andy, @kbz8 was ANSWERING the original question of one of those irrita... (by lastchance)
Member class in c++
 
Hello , I am really new in C++ development . I am working on Qt Application . I need to call a mem...
[7 replies] Last: thank you all I solve the issue :D :) (by dzeko1236)
how to replace sscanf in c++?
 
I am just wondering if there any replacement in c++ for sscanf? Below is the lines of code which I ...
[5 replies] Last: I dont have C++17/20 support. So I shall go ahead and use std::sscanf. (by leo2008)
Sphere to Sphere Collision Detection
 
Does anyone know where to start when it comes to Sphere-Sphere Collision Detection? I'm drawing a co...
[7 replies] Last: I got from the teacher during class (by zXFlameXz)
[Error] no matching function
 
why got this error : no matching function for call to 'std::basic_string<wchar_t>::basic_string(TCH...
[6 replies] Last: working thanks so much , (by Hawlong)
by kbz8
void pointer to class pointer
 
Hi everyone. Is there a way to convert void pointer to class pointer and use it as a class object ?
[2 replies] Last: Okay, thank you (by kbz8)
when use GetFocus() get Different Hwnd
 
i use this function .. HWND GetFocusGlobal() { HWND Wnd; HWND Result = NULL; DWORD TId,...
[no replies]
by kbw
A power electronics controls in C/C++ embedded and software pointer for PC program
 
Now could you kindly give some tips to handle the whole project? You haven't said what your project...
[no replies]
by jonnin
Array Method
 
if you want to keep a bunch of patients, a container (an array is a container) or a disk file (which...
[4 replies] Last: The OP deleted their original post by editing to say something like "I... (by Furry Guy)
How to add timer and pause after program in Vscode
 
I was using Dev-c++ before, and it will automatically add "-------------------------------- Process...
[1 reply] : https://www.cplusplus.com/forum/beginner/1988/ the timer and return v... (by jonnin)
https://www.cplusplus.com/forum/general/279238/
 
Let say I have a mesh of two elements and four nodes. Coordinates 1 -8 3.1...
[15 replies] Last: There is text file containing all the mesh properties(connectivity and... (by resabzr)
Valgrind: segmentation fault error (1,2)
 
I have a serial code that is working perfectly and printing out data as expecxted. I rewrote a paral...
[29 replies] Last: No worries. Sorry for making you deal with my broken code. (by helios)
by helios
Forward compatibility with abstract classes
 
I just read something that I'm pretty sure is incorrect, but I wanted to make a sanity check. Sup...
[5 replies] Last: Example with four translation units: class Base { virtual int meth... (by keskiverto)
unclear variadic template recursion
 
Hi, which of the 2 codes is correct: template<class Opt> constexpr bool has() const { ...
[8 replies] Last: Okay, thank you for the explanation. (by coder777)
calling methods from another class
 
I have two classes Node and element and I made a vector of each class's objects; class Node { publ...
[16 replies] Last: I do appreciate your explanations.it was helpful. (by resabzr)
Some hard questions (maybe?)
 
Hi guys! I'm new to this forum and community. Wanted to take a second to introduce myself here. I'm ...
[4 replies] Last: I suggest making a test WAV file that just makes a constant, pure fre... (by Arcalise08)
Need slight help with adding two more code words for user to guess
 
Hey y'all, the basis of my program is similar to hangman. I want to display 3 code words out of the ...
[5 replies] Last: As a simplified and updated version, perhaps consider: #include <io... (by seeplus)
Assign array to magic hexagon
 
Hello to everyone; x y z a b c d e f g h i J k l m n o p The following c...
[5 replies] Last: your code also runs fast but still listed from 1 to 19 my c++ knowled... (by anticode)
Pages: 1234... 6
  Archived months: [jun2021]

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