General C++ Programming - March 2018 (Page 14)

by kada17
Derived class can't access protected variables in base class
 
Link to code: header file: https://pastebin.com/078QyCmQ implementation: https://pastebin.com/pJ8zYKSk Hey everyone, I am having trouble with using th...
[2 replies] Last: That was the problem. Thank you very much!!! (by kada17)
by Mahe18
unordered_set of regex objects
 
Can anyone please help me how to create unordered_set<std::regex> objects. My sample code ; #include<iostream> #include<unordered_set> #include <regex> u...
[1 reply] : Why do you need a set of regexes? That's very unusual. Would this work... (by helios)
by stav
overloading a macro ?
 
Hi I'm writing a simple logger that is basically just a wrapper around the std c libs 'printf' function, that appends some additioinal information on to the ...
[3 replies] Last: Nice. I thought boost::format used the %index% syntax. (by helios)
Code::Blocks - No default include directory?
 
Hello. I come from Microsoft Visual Studio 97. I wanted to try to switch to a newer IDE, so I tried the free Visual Studio from Microsoft, but it was a horror...
[1 reply] : So I installed the version with the MingW compiler built in, and per ... (by olfibits)
Beginner c++ student with question about using strings
 
I have an assignment where I have to: 1.Display three destination choices for the user to select (one) choice. (Atlanta, Tallulah Falls, Washington, DC). 2.A...
[4 replies] Last: As a beginner I would recommend to code slowly and detect vulnerabilit... (by benhart)
help a bro out
 
This class is missing a number of functions. Rewrite the class declaration to follow best practices, e.g., operators, three important functions, and printing...
[2 replies] Last: I would help you out, but I've read trough your post and found no ques... (by Marcus Aseth)
by sephi
Question about reading files
 
I have a file with N blocks of data. There is a space of two empty rows between them. I would like to make a script in c++ that read only the last block in ord...
[7 replies] Last: you can use the file size to find the correct position to jump to in a... (by jonnin)
by stav
Clever way to avoid execution of classes functions
 
Hi I'm writing a game. I'm structuring the game is such a way that theres several "systems" (that derive from ISystem) Ex: AssetManagementSystem, Window...
[2 replies] Last: one way to do debugging is simply #defs... #ifdef debugflag debug cod... (by jonnin)
by i773
Can't pass custom class to CLI
 
I have a custom class in C# that I am trying to create in CLI and pass back to a service: //C# //DocumentLayer public class DocumentLayer { ...
[no replies]
Send help
 
All shorts of lost. PLEASE HELP!! Background: A local college stores information about students pursuing a degree in Computer Information Systems in a fi...
[2 replies] Last: you say that but dont help... now that is counter-productive. (by JSchaeffer4515)
Homework
 
Hello This is my homework and I am having trouble figuring how to start would appreciate the help! It is the year 2035, the MarsX Space Vehicles Company has re...
[7 replies] Last: You do need loop(s) and conditional execution. Read: http://www.cplusp... (by keskiverto)
Reversed contact between classes [help]
 
So I've been having this uncertainty for a long time about my way of doing the rendering. So the game engine has objects and drawer classes, in order to render ...
[no replies]
by matcer
Ramp of double samples generation
 
Hi I need to create a linear ramp of double samples given start stop and resolution (step) Can anybody give a code example to do so? Thanks Ciao Matteo
[1 reply] : Do you mean that you would have something like ramp(k) == start + k*st... (by keskiverto)
getter and setter
 
#include <iostream> using namespace std; class fool { private: string name; public: string getname(){return name;} void setname(string n){name=n;}...
[2 replies] Last: 1) Please use code tags when posting code, to make it readable: http... (by MikeyBoy)
C++ Program that implements the Bubble sort algorithm.
 
Hello, I am doing a class project in which I need to create a C++ class to implement the Bubble sort algorithm. I will need to create a class with the followin...
[3 replies] Last: @jose23567, thanks for the kind words. (by chicofeo)
couple questions about C++
 
1. All of the following options below are valid arithmetic operations that can be performed on pointers EXCEPT: A. Add one pointer to another pointer (ptr1 + ...
[5 replies] Last: Peter is def right, idk how I put B last night. From what i remember c... (by r6racer)
Comparing Times
 
Hello All, I currently have a small problem. In my game, I have need of being able to record the current time, to save as a string (will save string to json usi...
[1 reply] : Something along these lines, perhaps: #include <iostream> #include <... (by JLBorges)
Move operator for object that doesn't manage resources
 
Is it correct to say that "move" operation doesn't make any sense for objects that don't acquire resources? For example class A{ int number; } clas...
[no replies]
using CryptUnprotectData
 
i have some encrypted data (char * data) i wanna decrypt it with cryptunprotectdata function i found something like this but how can i do this DataIn = char *...
[5 replies] Last: Sorry I can't provide an example since I haven't done anything with it... (by coder777)
March 2018 Pages: 1... 12131415
  Archived months: [feb2018] [apr2018]

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