General C++ Programming - May 2021 (Page 4)

SDL not loading texture
 
Can someone plz tell me whats wrong with this code. its running just fine, there are no errors. but the thing is its not loading textures. thanks. #includ...
[3 replies] Last: Yup, just like Helios said, you just declared load media but never act... (by brianbathorycpp)
by IanTG
Thumbs up
 
I'm having issues with this code, I want to put thumbs upon at the end of my code, this is what I have. But I keep geting errors like this, Class "std::basic_s...
[2 replies] Last: Never mind, I solved it haha. (by IanTG)
by CVRIV
Initializing an array with unknown size.
 
I'm having an issue. I googled this topic and can't seem to find the right solution. I want to work with a char array, in my main code, that is populated in s...
[10 replies] Last: an array instead of a string a string is a wrapper for an array, of s... (by jonnin)
by cmisip
Can you comment on this Serialport code? (1,2)
 
Arduino : start bit, ID, data (2 bytes) uint16_t buff ; uint8_t MESSAGE_START=0x7f; uint16_t send(uint8_t x){ do { Serial.write(x); //ID of data ...
[21 replies] Last: Here is a two byte version with delay of 4 milliseconds that also work... (by cmisip)
by IanTG
School capstone project
 
Hello, I am writing a code for my school project about a camping simulation, but I need to write a save and load the file but I'm a little confused on...
[10 replies] Last: ofstream will erase any existing contents of the file! (by seeplus)
Need help
 
I rechecked it and fixed two of the errors now it is just an error on line 82 the initiating the module. #include<iostream> #include<cstdlib> using namespace...
[3 replies] Last: Paste the actual text of the error message. In function 'int main()'... (by salem c)
by c1885
Initializing an arrary of strings ?
 
I have been studying sorting algorithms for strings. I have a question about initializing arrays. With c++ we can initialize and array as follows: const ...
[5 replies] Last: Thank you Ganada and kesklverto, This is a good reminder. This toggl... (by c1885)
by puia
Converting an OpenGl rendeing project into dll
 
Hello i have implemented a rendering tool with opengl ( 32 bit - Release - C++ - console application ) which can be called in the main function by calling a c...
[7 replies] Last: can it be becasue of the wrong marshalling of the data while using th... (by helios)
Red lines in code (in VS), but code compiles fine?
 
I am trying to get started with an existing project in Visual Studio. When I view the code, I get the red squiggly lines under all the #includes, which say "...
[6 replies] Last: Good things to note, thanks. (by Ganado)
How to insert and print array elements?
 
and the C++ question is.......
[3 replies] Last: LOL, I didn't even look at his link. I figured it was some seedy web... (by JRManx)
std::vector::resize without inserting default elements
 
From cppref we have: (https://en.cppreference.com/w/cpp/container/vector/resize ) (talking about std::vector::resize) If the current size is less than count 1) ...
[5 replies] Last: Note, for: class obj{ public: int x, z, y; }; All these are true... (by keskiverto)
by Cplusc
Mpi send and receive
 
Mpi send
[7 replies] Last: I am trying to arrange it so that: (a) root (processor 0) is the only ... (by lastchance)
Classify order
 
How can I save the orders by daily and weekly basis to a file class orderSystem { protected: int order,ch,choice,total=0; string y, ye; publ...
[17 replies] Last: That error appears in the C++ Shell with C++14. So using auto is obvio... (by coder777)
Identifying exact heap and stack memory in program?
 
Hi I got some help earlier on a problem similar to this which helped me find stack values for "List myList;": stack 8, "List *special = new List(10);": stack 4,...
[18 replies] Last: You're welcome! I learned quite a bit. (by mbozzi)
writing Ascii stl file for cylinder
 
Hi, Im trying to write a code that can generate Ascii stl file to make cylinder. main: #include "Cube.hh" #include "Cylinder.hh" int main() { /...
[2 replies] Last: You need to decide how you are going to specify the orientation of you... (by lastchance)
by cmisip
How to overload operator== for static array? (1,2)
 
I have this code: class SimVariables { public: static const CString Names ; static const CString Units ; }; const CString SimVariables::Nam...
[22 replies] Last: Thanks a lot guys. Here is the final method for OpenFiledialog. Ther... (by cmisip)
How can I add containers such as list, Map/set and stack/queue to my code?
 
How can I replace the string function to queue/ priority queue in a code? String function to change: string people = {"Noah", "Lily", "Marcus", };
[3 replies] Last: its hard to say without moar code but likely you use the array as a lo... (by jonnin)
by JRManx
I wish to create my own Immediate mode GUI library in C++ for learning purposes and for creating my own tools
 
Try https://reddit.com/r/programming.
[no replies]
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 it prompts you for a name and you can enter anything, for exa...
[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 objects. What is wrong with the code I typed. Thank you! #incl...
[3 replies] Last: #include <iostream> using namespace std; class Prism { double heig... (by seeplus)
May 2021 Pages: 12345
  Archived months: [apr2021] [jun2021]

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