General C++ Programming (Page 10)

by mbozzi
How do I use string_view where a C-string is expected?
I've written a function foo() whose purpose is to call something that requires a C-string: void ...
[6 replies] Last: Just wanted to post an update: I've been using something like the c_... (by mbozzi)
Event System Implementation Issues
Hey everybody, lately I've been working with game engines, trying to understand how they work, start...
[1 reply] : According to the documentation I found on line, you made a small mista... (by doug4)
I/O files, functions,error checking
Hi guys, I have to write a program that does the following: Write a program that reads data from...
[2 replies] Last: All I have right now is what I posted. I only have the main.cpp file s... (by explicit)
how to declare and initialize variables off main.cpp for use on main.cpp
I have 30+ variables grouped together in my main.cpp that I would like to move the declaration and i...
[10 replies] Last: Thank you, I have a lot to study. It might be that the answer is to ke... (by technologist)
by deanF
Help Printing templated AVL tree
i have no idea as to how i would write a print function for this program and i was hoping somebody c...
[1 reply] : You need to visit every node and output it. Recursion can be applied. ... (by Repeater)
by d1456
one-dimensional array
Create a one-dimensional array to read 20 alphabetical letters (your program should be able to detec...
[8 replies] Last: if (isalpha(letter )==0); is wrong. it should be if (isalpha(lette... (by Repeater)
Error in ./a.out: free() issue
Hey, I'm getting an error when deleting a dynamic array in the deconstructor of an object. This is ...
[1 reply] : movie m(name,classification,critic_rating); movies =&m; } // <-- m ... (by Peter87)
trace driven memory simulator
a trace driven memory simulator and run a set of experiments using simulator Simulator should acc...
[5 replies] Last: I assume this is some kind of school assignment. If you have no idea w... (by helios)
Inheritance going wrong
I'm working on a simple game framework based on SDL2. I have two base class types; - item (which ...
[2 replies] Last: Ah, thank you Thomas1965. I had the wrong idea about how virtual fun... (by newbieg)
How to change the function such that it guarantees a linear time worst case runtime.
struct Node { T data; Node *next; }; Node *front; Node *back; The be...
[3 replies] Last: See and consider r... (by homy18)
C++ | I/O
Write the program in c++ that the names of the files to read are passed to the program as command li...
[1 reply] : rather than getline, you might want to just read word by word... stri... (by jonnin)
by rcx11
Pointer to Member Function (I know; I'm not supposed to)
I'm trying to set up an equations solver using the GSL root finder routines. In short, I have variou...
[6 replies] Last: Well, if you are calling a static member function, you no longer need... (by doug4)
How to remove the 'k' number of elements in a linked list.
How to remove the 'k' number of elements in a linked list. I search the many sites on the internet ...
[7 replies] Last: Sorry, I missed that. in the case of splitting a list, you do want to ... (by jonnin)
Help with threads
Hello everyone! Here is the code of the Universal Turing Machine from a few text files which can exe...
[2 replies] Last: > I need to figure out a way how can I make this Turing Machine parall... (by JLBorges)
Help Needed in these Calculations
#include <iostream> #include <cmath> #include <string> using namespace std; int numberOfPeople...
[3 replies] Last: you assign numberOfBatches before you read in numberOfPeople. you c... (by jonnin)
by cmisip
How to access a derived pointer member from base?
#include <iostream> #include <string> #include <memory> #include <stdio.h> #include <string.h> ...
[10 replies] Last: Thanks Guys, These are really good answers. I might be trying to solv... (by cmisip)
"while" problem
hello , i have a some problem , if i write yes or no programme working succesfull but if i dont writ...
[5 replies] Last: Right, I was more referring to the act of returning than the value. 0 ... (by ntchambers)
How to use HANDLE VARIABLE from main in other cpp files (1,2)
Have a problem. - I am making a function for my struct called READPLAYERINFORMATION(); - Inside th...
[22 replies] Last: Another alternative: use ReadProcessMemory() from Player_t::ReadPlayer... (by helios)
Help me fix a LNK error
Severity Code Description Project File Line Error LNK2038 mismatch detected for '_MSC_VER': value ...
[1 reply] : Perhaps ths page can help: (by Enoizat)
by Amaris
Understanding list::splice
The definition for iterator validity after list::splice operation: Iterator validity No changes ...
[4 replies] Last: #include <iostream> #include <list> int main() { using std::cou... (by tpb)
Pages: 1... 89101112... 16
  Archived months: [aug2018]

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