General C++ Programming - February 2019 (Page 10)

by Fadey
calling from global class's constructor, is it safe?
 
void triggerMe(int in); class second; class first { public: int something; first() { something...
[4 replies] Last: Your first example, works, but only because csecond contains purely PO... (by dhayden)
Create a specific structure of array in C++
 
I want to create a structure in C++ in which some of its elements are arrays (as the following code)...
[5 replies] Last: dynamic does not have to mean that it will change size, it just means ... (by jonnin)
i need to add yes or that will restart the loop or exit
 
After identifying the winner, the system should ask if the user want another game (If the user selec...
[6 replies] Last: switches specifically work on integer cases only. You have to find a ... (by jonnin)
C++ Colors
 
I am making tic tac toe game and i want my char 'X' to be blue and my char 'O' to be green and if 'X...
[6 replies] Last: It is working now thank you so much. It has some errors but i fixed th... (by Aleksa03)
by RmmB26
C++ community. i have Tasks and need yor help!!!.
 
i need your help. i try to find where is the mistake or mistakes and how to find solution for this c...
[2 replies] Last: I'm not 100% sure what the actual desired behaviour for this program i... (by TomBroughton)
Trying to improve the leap year algorithm
 
I am trying to improve the leap year algorithm to tell me when the next leap year is if the year ent...
[4 replies] Last: #include <iostream> bool IsLeapYear(int y) { return y % 4 == 0 ... (by dutch)
Data file read
 
Hello everyone, I am trying to read from a data file. I have a working code, but i am having difficu...
[3 replies] Last: Thank you everyone for being great help! It works now and also fixed t... (by hello321)
by frek
Does a C++ programmer need learning C in 2019
 
Hi all, I know that how powerful both C and C++ are. C++ added some new features to C and evolved...
[7 replies] Last: Windows, especially its new ones (7 and 10), are mostly written in C+... (by closed account E0p9LyTq)
by nhnam
The insertion in map STL cause code 0xC0000005
 
Hi.I'm implementing the hash map for my own purpose, and my method for this is using a vector of map...
[16 replies] Last: you can compare 8 bytes or less at a go with a 64 bit int. Should be ... (by jonnin)
by RmmB26
C++ community. i have Tasks and need yor help!!!.
 
please, help me to find, what is the final result and how it works. it's code #include <iostream>...
[3 replies] Last: A long time ago (286 era here) I tried a BUNCH of ways to swap (int, d... (by jonnin)
const_cast
 
For the following program: #include <iostream> using namespace std; int main() { const int...
[6 replies] Last: let me try to explain what you might be seeing, in beginner terms. ... (by jonnin)
Logging functionality
 
I'm making a logging class that is supposed to help with debugging some programs that I'll eventuall...
[10 replies] Last: I'm really unfamiliar with how one would detect errors from the compi... (by AbstractionAnon)
Evaluating Postfix Expressions with Alphabet Characters
 
Hello, I am writing a program that takes postfix expression strings, such as: AB+CD-* And eva...
[1 reply] : > Is there a better way to do this instead of using an if statement? ... (by JLBorges)
Creating a (custom-language) compiler able to use third-party libraries
 
Hello, I'm trying to make my own compiler and ran into a few issues. I know how to get the lexer an...
[7 replies] Last: Get John Levine's book Linkers and Loaders , ISBN 978-1558604964 It'... (by mbozzi)
by Fadey
difference between switch, default [] operator and if else.
 
(no optimizers) int arr = {0,1,2,3} int m1(int i){ return arr } int m2(int i){ switch(...
[4 replies] Last: I heard a rumor that compiler makes other elements happen so it can f... (by jonnin)
by vibhu
Communication between threads in c++
 
Hi I am trying to print repeated pattern using thread only 5 times when number of thread are 5 but...
[8 replies] Last: thankyou very much Konstantin2 it's working now thanks salem ...now i ... (by vibhu)
Reading errors/warnings from the compiler
 
Part of the project I'm working on has me write errors/warnings to a log file. I understand that thi...
[14 replies] Last: Oh I didn't see the code snippet my bad. Makes sense. (by Grime)
problem
 
sfghkl.
[12 replies] Last: In the past 5 minutes I've seen 2 posts titled "Question" and one titl... (by dhayden)
by Fadey
std:time() returns invalid time.
 
It is said that std:time function from <time.h> should return the same time if called same time, no ...
[6 replies] Last: What makes you think that time() is returning one timezone or another?... (by dhayden)
February 2019 Pages: 1... 891011
  Archived months: [jan2019] [mar2019]

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