General C++ Programming (Page 2)

2d matrix of pixels to screen
 
I have a program (slime mold simulation) that generates a big 2d array of values. I want to draw thi...
[3 replies] Last: maybe take a look at the example here: http://www.rastertek.com/dx11t... (by jonnin)
Struggling to use getline correctly? Skipping inputs?
 
Hey guys! Im new to C++ and having a little difficulty with this program, Its supposed to be where i...
[9 replies] Last: Perhaps even simplified as: #include <iostream> #include <limits> #... (by seeplus)
What is wrong with my code?
 
I am new to C++ and I have been working on this for a while to display volume for two classes of obj...
[3 replies] Last: #include <iostream> using namespace std; class Prism { double heig... (by seeplus)
.exe file crashes outside VS but work inside
 
I have a program that works well inside visual studio when I launch it via local windows debugger, b...
[9 replies] Last: Bassel, it's because the program is over once main returns. And once t... (by Ganado)
change password program
 
Have to create a database that contains names, usernames and previous passwords, and hardcode that i...
[14 replies] Last: I use MS VS2019. You need to compile as C++20 for L80. As a minimum yo... (by seeplus)
by lynn22
How do i write the code for balanced array...URGENT please
 
An array with an odd number of elements is said to be balanced if all elements (except the middle on...
[13 replies] Last: To be honest, I have no idea. He says it works, though. I have sugge... (by agent max)
Using CImg to creat 3D object and export to .stl file
 
I have a 15 year old boy that got a job last summer so that he could buy himself a 3d-printer. He ...
[1 reply] : Funny, there was just another thread talking about stl files as well. ... (by Ganado)
having trouble with my hw for stl file
 
* separate compilation Cube.hh Cube.cc Cylinder.hh Cylinder.cc optional: Sphere.hh Sphere.c...
[6 replies] Last: Forgot to give a reply earlier. I'm kind of just winging this, but you... (by Ganado)
Including/using <regex> will not run on some machines?
 
I am creating a dll which gets loaded by a game engine. It runs fine on my dev machine, however doe...
[2 replies] Last: Unfortunately I don't get to see any error message, as I only have the... (by coldscooter)
thread_local std::vector error
 
C++ Builder XE4 this code give the error E2461 'TempOptions' requires run-time initialization/final...
[3 replies] Last: C++ Builder even if it is the latest version (XE4 is from 2013) isn't ... (by Furry Guy)
Greedy algorithm to fill 2d array
 
Hello, can someone help me with the following problem: Is there a way to write a greedy algorithm t...
[10 replies] Last: Well here were are, 11 messages into the thread and the OP still won't... (by dhayden)
split string S
 
How can I split string S into substring S ? Also substring S should set some number a . Should I u...
[13 replies] Last: cut one segment into two and pay for this a price equal to its length ... (by jonnin)
Converting struct to class? xxx is private within this context
 
Not sure how to alleviate this issue (see title). I went ahead and was in the process (not finished ...
[3 replies] Last: If the 0-arg Product constructor must be private, then don't call it. ... (by Ganado)
How to access instance variable value?
 
I created n objects from the Stock class and assigned a value for the integer instance variable expe...
[6 replies] Last: vector<Stock> shares( n ); ... ... sort( shares.begin(), shares.end()... (by lastchance)
by CVRIV
Having trouble comparing \r and \n from a text file.
 
I'm having the weirdest issue. I'm trying to count characters in a text file, while excluding \r...
[2 replies] Last: Yea.... I figured this out hours ago. I should of deleted this thread ... (by CVRIV)
Nested class/Double-linked list confusion
 
Hi everyone, we were provided all the following code and told to write the addLongInt() function. We...
[7 replies] Last: There is still a lot I have to learn. Compare your approach to my c... (by seeplus)
Do custom allocator apply just to containers, and how do i apply them to any memory allocation
 
https://en.cppreference.com/w/cpp/named_req/Allocator I am referring to this ^^^^ kinds of custom...
[6 replies] Last: There's no point in aligning the vector. (by mbozzi)
Log File Wrap Over Failing
 
Hi All, I'm having an issue with my app at midnight when it's meant to start writing to a new log f...
[6 replies] Last: GCC, for instance, will only warn on shadowing if you explicitly enab... (by MikeyBoy)
destructor called after calling constructor
 
By looking at the example: #include <iostream> int wow=0; class Foo{ int cow = 0; public: Foo...
[7 replies] Last: Okay I already get it. Thanks for your help. (by mjjm1442)
Array of Structures Memory Issue
 
In my main function, I create an array of structures which stores cache information i.e. dirty bit (...
[2 replies] Last: It would help to see the code that's calling the function. How certai... (by MikeyBoy)
Pages: 1234... 9
  Archived months: [mar2021]

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