General C++ Programming - July 2021

Printing string creates stackdump
Moving on from , I put that aside temporarily and decided to just move on for now. New issue: The code thinks th...
[12 replies] Last: Here you go, OP. I removed a... (by helios)
Questions relating to algorithms, sorting, linked lists, and functions
Should an algorithm with a better worst case runtime should always be used over an algorithm with a worse worst case runtime? If the user runs a linear searc...
[3 replies] Last: N^3. why? the inner loops is n*n, the outer is n/3, ignore the const... (by jonnin)
Please help me figure out what I'm doing wrong here
I'm making my own programming language, I have some experience with that in Python and Java. But I tried doing it in C++ and now I have an issue with reading fi...
[10 replies] Last: Update: It's not solved at all, I'll make a new thread for this tho as... (by AceKiron)
Purchase C/C++ license
I wish to purchase a license to MS C/C++ 2017 professional edition, without other aspects of Visual Studio 2017. Is it possible to do that? If so, how?
[3 replies] Last: If you need a professional edition of VS look into VS 2022. Not yet o... (by George P)
Image rd file compress (1,2,3,4)
Hi I am trying to read TGA file and then need to compress to almost half the size of the image file. How can this be achieved in cpp? Any suggestions usin...
[67 replies] Last: > Verify manually means? Somewhat simplified; verify that the types ... (by JLBorges)
Add graphics to executable without resource rc file.
Using C++11 on a Microsoft Windows operating system that is 32 bit and compiling with Code::Blocks 17.12 . I have been reading about using a resource file. I...
[12 replies] Last: helios, thank you. It looks like I might build the bitmap from scratc... (by keyboard9)
Need replace enter key c++
I am trying to find a way to replace pressing enter key in c++. below is c code. can someone help me? after press enter key detected, user needs to provide som...
[5 replies] Last: If your compiler supports conio.h (and VS does), then the 'old' way of... (by seeplus)
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 containig main(). Is it okay in this case to not pass arguments to...
[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 every iteration I receive a frame I convert it then I fill an a...
[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 sqrt. #include <cmath> #include <iostream> int main() { ...
[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 member class in another class without creating an instance . ...
[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 need to replace sscanf. Any idea? Should I use std::sscanf? ...
[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 complete blank, and have no clue.
[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(TCHAR )' code: #include "Windows.h" #include <psapi.h> // Fo...
[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, PId; Result = GetFocus(); if (!Result) { ...
[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 should do. What do you want to do, that you have difficult...
[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 is technically a container but it is not the same as a prog...
[4 replies] Last: The OP deleted their original post by editing to say something like "I... (by George P)
How to add timer and pause after program in Vscode
I was using Dev-c++ before, and it will automatically add "-------------------------------- Process exited after 1.437 seconds with return value 0" after runni...
[1 reply] : the timer and return v... (by jonnin)
by Cplusc
Let say I have a mesh of two elements and four nodes. Coordinates 1 -8 3.12281 0 2 -8 1.12281 ...
[15 replies] Last: There is text file containing all the mesh properties(connectivity and... (by Cplusc)
July 2021 Pages: 123... 5
  Archived months: [jun2021] [aug2021]

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