General C++ Programming - November 2021 (Page 2)

C++ Ide for Helicopter Game
 
Your choice of IDE is entirely a matter of personal choice, and has no bearing on the outcome of the project. If you can't finish the program, it won't be becau...
[5 replies] Last: OP is a copy/paste spambot pushing some "interview" website. Original ... (by salem c)
array
 
28 1 expected unqualified-id before '{' token May I ask what is wrong? if I remove the ; more errors happen, but if (;) stayed, that error above shows. tha...
[1 reply] : Line 27 should not have a semicolon. Line 32 should be: for (int a... (by AbstractionAnon)
I am getting an exception when I run this code. It built successfully.
 
I am getting an exception when I run this code. It built successfully. I think the exception is occuring during the execution of the void showgameboard functi...
[2 replies] Last: These errors are easier to spot when you give your variables more mean... (by thmm)
array
 
ld returned 1 exit status .cpp:(.text+0x21): undefined reference to `fill_array(int*, int, int&)' is this because I forgot ;? [my code] #include<ios...
[3 replies] Last: thank you so much for the reply! (by beginnerzzzzz)
find cycle in array
 
if i have an array of 8 integers every element in any index point to the next index like if we have 2 in index 0 so it point to index 2 cycle defined here to ...
[3 replies] Last: From a starting position, follow the chain until you either come back ... (by seeplus)
Sort an array in pairs????
 
Hey yall, So for class, I got a new assignment and cannot figure it out for the life of me. The assignment is to write a function to sort an array of numbers...
[6 replies] Last: ah, OK. I realised that part, that it was a hack & only usable on a f... (by jonnin)
hello
 
Hi. As a C++ beginner, have a look at this web site if you don't know of it already. https://www.learncpp.com/
[no replies]
Alignment in an Array Problem
 
I have a problem in picking the show item list. How can I align the inputs on the table and what kind of condition can I do to only out out "no records found" w...
[4 replies] Last: Okay bro, thanks for the information you gave to me. I hope I'll do th... (by ForgottenLaw)
C++ Program help
 
I have a task to write a program in C ++ with the following condition: To write a program for obtaining all natural numbers not exceeding a given n, which repre...
[17 replies] Last: Heh, it’s a fun homework prompt. I did my version using a recursive ... (by Duthomhas)
C++ Function f(x)
 
I have a task to write a program in C ++ with the following condition: To write a program 0 ,at x <=0 f(x) = x , at 0 < x <=1 x^4 ,at x ...
[4 replies] Last: Despite the title, he/she isn't writing a function. Which was part of ... (by lastchance)
Need help
 
Write a program that takes a 3x3 matrix as input and asks for a number entered and prints out its position in the matrix. It displays not found if the number is...
[2 replies] Last: QuanTFlow (1) Write a program that takes a 3x3 matrix as input and as... (by jonnin)
by Nazuki
Void Function
 
I declared a void function but when I tried to call it inside a switch statement it would not show up. Does anybody know what mistake I did? I only want to figu...
[1 reply] : line 58: The problem is your case label, not your function call. Your... (by AbstractionAnon)
condensing similar overloaded functions
 
Is there a nice way to reduce the pseudo code below into just one function? This code must be very fast (we are using SIMD, intrinsics, multi-core etc). Righ...
[10 replies] Last: less than 1% - an overloaded address-of operator #include <iostream... (by JLBorges)
Query re. unresolved external symbols / multiple .h .cpp files and classes (1,2)
 
I've been looking at a command design pattern to go in my portfolio, and have gotten a little stuck when implementing my own variation. It started when I want...
[20 replies] Last: Just wanted to say thanks again. (by RyanPaul87)
by Cplusc
reading text file with unknown column size
 
Hello everyone. I wrote a code to read a txt file with specified number of column into a vector of vector. This text file has two part, the first part starts an...
[9 replies] Last: The format is .txt (by Cplusc)
How to kill a detached thread
 
Hi, I am hardware verification engineer and we are using C++ for our Verification env. I am facing an issue, where I am running a background thread (detache...
[2 replies] Last: sometimes, its OK to just kill stuff via the OS rather than fuss over ... (by jonnin)
VS2019 linker error using SDL library (1,2)
 
Hi All I'm trying to use SDL 1.2 library. I'm using Visual Studio 2019 with v142 compiler.I have linked to SDL.lib and SDLmain.lib in Linker -> Input -> Add...
[26 replies] Last: LNK2001 is gone, after I CHANGED FROM (Multi-threaded DLL(/MD)) TO C... (by denver2020)
Press any Key or Enter to Continue or Press N to stop Problem
 
Hello. I have a concern in the code below. The program should continue whatever keys I entered or whenever I press the Enter key and the character 'N' should en...
[3 replies] Last: The implicit tip here is that you should enable compiler warnings. Se... (by Ganado)
by themts
forward declaration of template class not working with msvc but gcc
 
Hey guys, I wrote a lib that needs to run under linux and windows. In linux I'm compiling with GCC and in windows I'm using msvc2017. In my library-header I h...
[17 replies] Last: That's kind of the point of templates. They are not exported they are... (by mbozzi)
GetModuleInfo Function
 
Please any example to use this function MODULEINFO GetModuleInfo(char * szModule) { MODULEINFO modinfo = {0}; HMODULE hModule = GetModuleHandle (szModule); if...
[2 replies] Last: Thanks so much , but if i change "kernel32.dll" to game name got err... (by Hawlong)
November 2021 Pages: 1234... 6
  Archived months: [oct2021] [dec2021]

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