General C++ Programming - July 2022

by Geckoo
Computation using GPU instead of CPU
 
Hello. I have a little question about computation using a classical computer. As you know I develope...
[4 replies] Last: CUDA is Nvidia-specific and, to the best of my knowledge, works with... (by kigar64551)
Replacement for global variables
 
So, my professor assigned this project where we cannot use global variables. (I DO NOT HAVE ENOUGH ...
[9 replies] Last: Maybe something like: #include <iostream> #include <iomanip> using... (by seeplus)
by Runsva
Function Pointer using "typedef" keyword with Function Address stored as Variable? (C++ 14, VS 2019)
 
---- Problem Summary ---- I'm attempting to create a callable function pointer inside of a functi...
[6 replies] Last: On mainstream implementations, (on any POSIX compatible system) a fu... (by JLBorges)
by PeteDD
pass header name (withoug .h) in class constructor ... and #include
 
My head is wrapped around the axle once again... I am designing a system where I need to pass the n...
[8 replies] Last: jonnin and mbozzi, Thanks for thinking about it. The point is clear ... (by PeteDD)
HELP on array and function project code.
 
This is for a project for one of my online classes and I don't understand why it isn't running. ...
[16 replies] Last: Dealing with the very-tight strait-jacket approach most C++ courses fo... (by deleted account xyzzy)
Help with Files into Vector assignment
 
If you have not downloaded the Gaddis text book’s source code, you will find the following files...
[2 replies] Last: What help is required? Can you open/read from a file OK? Can you use a... (by seeplus)
by frek
Max number of disc intersects
 
The task says: We draw N discs on a plane. The discs are numbered from 0 to N − 1. An array A of...
[7 replies] Last: On intersection, which of these do intersect? A = 1 A = 0 A = 1 A... (by lastchance)
Problem with Switch statement
 
I am having problem with this code where nothing shows up. It goes to the default statement displa...
[1 reply] : See your other thread. (by salem c)
Assigning weights to blank spaces and displaying them
 
I am supposed to create a racing game where the player will start at the highest weighted number and...
[3 replies] Last: When @Duthomhas says "use pythagorean theorem", he means use straight-... (by mbozzi)
by a456df
Blank Spaces assigned weights
 
Having trouble figuring out how make part of this game. I'm currently trying to assign value (weight...
[6 replies] Last: Whoops, I did some extra work in the above: // Find the "minimum dis... (by mbozzi)
by oddy
A exception has been thrown when solving 8-digit problem
 
As the title, I am going to solve 8-digit problem using breadth first search (BFS), but it has throw...
[5 replies] Last: no idea what that is Using your fingers to type, but not your thumbs... (by MikeyBoy)
The .cpp program does not see the GL/glew.h file.
 
In the directory where the program is located (C:\2022\Work\programming\engineering\my-works\my_game...
[3 replies] Last: @Geckoo, thank you! (by VladTsyb)
by ruzip
Translate Scancode to Virtual KeyCode
 
Is there a way to easily translate scancode to vk code? I'm using GLut.. Say if the scancode is 3...
[1 reply] : https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-... (by deleted account xyzzy)
Program Failing when trying to assign value to structure pointer
 
I'm creating a binary tree to guess an animal that a user is thinking of. The last problem I seem to...
[7 replies] Last: yes that solved it; the deletion of L68,69 and the insertion of the fo... (by whiteW0lf)
Is base class object created when a derived class object is created?
 
When i create an object of derived class, Does the base class object gets created too? Meaning t...
[5 replies] Last: > Technically, there is just one object, containing the fields of the ... (by JLBorges)
Check if a vector contain duplicate numbers (1,2)
 
If a vector contain duplicate numbers, return true, otherwise return false. For example: nums = [1...
[22 replies] Last: PS. For the set method, the time taken is pretty much dependent upon t... (by seeplus)
by ruzip
Assert Implicit Declaration or Non-existent Functions
 
or functions that does not exists.. Is there a way to do an assert on C (particularly) so if a fu...
[2 replies] Last: Thanks. I was also looking for an example using assert. (by ruzip)
by t im
Question about leetcode #209
 
The problem is to find a contigous subarray that is larger or equal to the given target(https://leet...
[3 replies] Last: I have figured it out. Thanks for your answer. (by t im)
Reading Integers with defined characters C++
 
I'm trying to parse a file that has has integers and strings in a CSV file. There in columns and row...
[2 replies] Last: I'm not sure what you want when you get an s? This code will display t... (by seeplus)
error C2039:string_view (1,2)
 
hello all, how can fixed this error error C2039: 'string_view' : is not a member of 'std' ...
[23 replies] Last: If you're a beginner, why are you copying relatively complicated code... (by kbw)
July 2022 Pages: 123
  Archived months: [jun2022] [aug2022]

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