
please wait
by oliveryasuna
Array typecast operator overloading.
|
Say I have the following (incomplete) class. class IntArrayWrapper { private: std::array<int, 3> array; }; Is it possible to overload the implicit typeca... |
Oct 21, 2020 at 2:54pm
[4 replies] Last: Do you mean something like this? #include <iostream> #include <array... (by dutch)
|
by oceanSpray
Validating user input twice
|
Hey ya'll I'm working with classes and need some help with validating user input from the main. I'm supposed to set and verify 5 array object with data entered ... |
Oct 21, 2020 at 9:09am
[2 replies] Last: One of the points in having setters is that they do any required valid... (by seeplus)
|
array and iterators |
#include <array> #include <random> #define MAX_TILES 100 class TILE; // Forward (polymorphic) class BAG { public: typedef std::array<TILE *, MAX_TILES>... |
Oct 20, 2020 at 6:37pm
[12 replies] Last: @thomas1965 & coder777, Thanks. I didn't think about iterator arith... (by AbstractionAnon)
|
by cgcoleman168
Encrypting A File Into An Output File
|
I an a beginner, and I need to make a C++ program that will go through the first step of encrypting an input file and writing the encrypted contents to an outpu... |
Oct 20, 2020 at 6:00pm
[3 replies] Last: you can do it in about 10-15 lines... read file stuff <random> -- seed... (by jonnin)
|
Number of Primes in Range (1,2) |
Write a program that asks the user for two non-negative integers and then displays a message indicating the number of primes found between the two numbers enter... |
Oct 20, 2020 at 4:12pm
[25 replies] Last: I think gcc is closer to the actual compiler. You can use any of g++, ... (by lastchance)
|
constructors and assignment operators |
Could someone check if the constructors and assignment operators are in a right manner? #include <iostream> #include <stdexcept> using std::cout; template<t... |
Oct 20, 2020 at 7:16am
[2 replies] Last: X& operator=(X&& other) { cout << "move assignment\n"; data = ot... (by seeplus)
|
by thmm
Generating make files
|
How would you create a makefile for a project that has only a bunch of .c and .h files? Are there any tools available that can create makefiles? |
Oct 19, 2020 at 11:48am
[5 replies] Last: I don't know anybody who likes to set up Makefiles. If you find a too... (by doug4)
|
Iterative Loops And Small Problems #1-3 (1,2,3) |
PROBLEM #1 Bob & Patrick’s Seashell Emporium uses mailing labels for shipping boxes. Write a program to display a mailing label for each box to be shipped... |
Oct 19, 2020 at 11:30am
[44 replies] Last: If you look back at the original assignment in the first post, there w... (by doug4)
|
by Jeff Viray
Simple charade game
|
Hello! I was thinking of making a charades game. Just a simple one wherein when you run the code it will display a Category and then the Word that the user will... |
Oct 19, 2020 at 5:45am
[no replies]
|
by mnm71
How to access function that use another class?
|
I use a class in another class like this : a.hpp Class A { public: void foo(); }; a.cpp #include "a.hpp" void A::foo() {} b.hpp #include "a... |
Oct 18, 2020 at 8:03am
[8 replies] Last: @keskiverto thank you my problem resolve with your solution And than... (by mnm71)
|
by adam2016
Ground symbol (code by Charles Petzold)
|
Hi guys, currently reading code by Charles Petzold, on chapter 5, he mentions words such as common and ground but I can't figure out what they do and how ... |
Oct 17, 2020 at 4:22pm
[7 replies] Last: When you find a common part of a circuit, you can remove the wires an... (by mbozzi)
|
by mnm71
How use JSON template in string ?
|
I want to send {state:success,value:i} // i is a float, take values from some function like the JSON template format over TCP server socket, if I don't u... |
Oct 17, 2020 at 1:18pm
[2 replies] Last: @helios thank you for replying to my question (by mnm71)
|
by SirEnder125
Where to ask C# questions?
|
Hello. I am trying to learn C# and I have some questions. Does anyone know where I can ask these? Website, etc. For anyone who can help here, I'm having ... |
Oct 15, 2020 at 9:03pm
[6 replies] Last: Thanks for answering. :D (by SirEnder125)
|
by oceanSpray
Swapping array elements using pointer addressing
|
Hi, I have created a 1d array of 25 elements that I'd like to manipulate using pointers. So far I have the array printing out as if it were a 2d array. I wou... |
Oct 15, 2020 at 7:53pm
[3 replies] Last: I ended up using two constant variables, one to let the for loop know ... (by oceanSpray)
|
by alexas
random generator in the constructor
|
Hello, I want to use the random generator which initializes every time when constructor is called: StructureGenerator::StructureGenerator(const float& mo... |
Oct 15, 2020 at 3:00pm
[19 replies] Last: To sump up, after learning about more about the topic, it seems that m... (by alexas)
|
by lambam
Stuck on Office Project
|
A business needs to calculate the bonus points for sales representatives. The bonus points are based on how much each sales representative sold the year. Wri... |
Oct 15, 2020 at 1:27pm
[7 replies] Last: 1. Don't put semi-colons after your if statement. 2. ((salesamounts >... (by Ganado)
|
Why const reference string |
Hi everyone, I just wrote this piece of code to test something, but it didn't go through the GCC-compiler because of the following error: C:\Project\TESTS\QtCr... |
Oct 15, 2020 at 10:46am
[4 replies] Last: The const reference is special. The compiler is free to generate a tem... (by coder777)
|
by eagerissac
C++ - incrementing integer variable does not work
|
So I'm creating a program that implements several classes representing a school, and its students and courses. I'm running into an issue in School.cc where the ... |
Oct 15, 2020 at 9:56am
[1 reply] : Also posted here http://www.cplusplus.com/forum/beginner/273440/ (by seeplus)
|
by SirEnder125
How to clear console without system("cls") (1,2)
|
Hello. I have been told that system() is "bad" to use... So, how do I clear the console screen safely without system()??? I doubt there is a way that anybody ... |
Oct 15, 2020 at 9:05am
[26 replies] Last: See my previous post. VT100 code support was introduced into Windows 1... (by seeplus)
|
by Jraysonn
How do I modify my code to organize objects and write them to a file.
|
Ok... i'm stuck here... I have a class called Items that creates an object with three attributes (MeshNumber, MaterialNumber, and name). I then have another cla... |
Oct 15, 2020 at 8:56am
[5 replies] Last: Simply, the spec for operator<< (and operator>>) requires the stream t... (by seeplus)
|