General C++ Programming - December 2019 (Page 2)

Passing array initialisation as argument in macro
 
I have a macro that logs stuff. I want to be able to pass array initialisation which was achieved simply by using variadic macros. Now I've expanded my macro ...
[10 replies] Last: This however has custom logging and can pass values through Please e... (by dhayden)
Qt creator - problem with <fstream>
 
I'm using qt creator on MacOS and I have a problem with compiling my programs. Everytime I try to open txt file with: fstream file; file.open("test.txt"); ...
[8 replies] Last: See: https://doc.qt.io/qt-5/qfile.html#setFileName QFile and QFile::s... (by againtry)
Reference for one of overloaded functions
 
How do we do reference for one of overloaded functions by & operator? void f() { cout<<"as usual is "<<"\n";} int main() { void (*p)() = &f; } solved...
[1 reply] : What do you mean? Show code as well and what you're trying to do. (by zapshe)
Xerces - How to read data in tag in CDATA section
 
Unable to parse the CDATA section in the input XML file. Any Idea? sample xml: <code> <script> <![CDATA[ <message1> Welcome to Tutorials...
[2 replies] Last: Thank you lastchance for the reply. I have implemented the below solu... (by akash16)
function's returned value type is either an alias or boolean once
 
How would we obtain a function's returned value type is either an alias or boolean once in a call (preferably if possible without overload) ? let's realize that...
[1 reply] : I don't understand what your illustration is showing. Are you trying ... (by Ganado)
File Input Output
 
Hello C++ pros, Question: I am trying to find a way, to store two strings into a file example "Test" " " "Test" "Test2" " " "Test2" and so on, as ever...
[2 replies] Last: thank you salem c I will modify the header for namespace, and try appe... (by Gr33nAl13n)
letters to numbers
 
i want to build a program that gets two strings from the user converts every letter of both strings to a number and adds each number to its corresponding one of...
[5 replies] Last: So this is what I ended up with: #include <iostream> #include <stri... (by johnjohn)
Need help in an Array Problem
 
You are given some binary numbers and their positions on a number line. A window that has equal number of 1s and 0s in it and the size of this window is the di...
[no replies]
চোপা ফাটায় দিবো~https://cupspengler.com/
 
Gtfo you are a scammer
[no replies]
by duduK
Date and Text
 
So I am making some basic app and I need to write text for every day between two dates. Example between 17/1/2019 to 17/1/2020, and I need to connect it to a...
[6 replies] Last: #include <iostream> #include <fstream> #include <string> #include <c... (by againtry)
by H00G0
Equivalent of <time.h> in <chrono>
 
Hello! I was wondering about one thing. I'm reworking on an older project of mine that utilises the header <time.h> and I'm intending on learning about using...
[8 replies] Last: Oh I see then, false hope on my part I guess! Thank you for taking the... (by H00G0)
Declaring variable in flowchart
 
Hello b0ss, Do you have to mention data type when declaring a variable in a flowchart?
[4 replies] Last: OK thank you b0ss (by GabeSonny21)
What does surv mean in this coding
 
I am using the following code to create risk scores for patients: https://qrisk.org/three/src.php The second to last variable listed after static is int surv ...
[10 replies] Last: It's interesting to run their QRisk3 online form. I did a couple of r... (by againtry)
Stuck at ostream operator << overload; need help
 
How can I overload ostream operator << for next class? Needed format for output is aaa.bbb (list Prije '.' list Poslije) class Dec { public: Dec(double b...
[2 replies] Last: You define the operator like this: std::ostream & operator <<(std::os... (by dhayden)
Avoid collision of nodes while representing Binary Tree in SFML
 
Hello, following is the code of the prgoram I have created in SFML (Please note, this is a Binary SEARCH Tree and also that I have only given the codes of Displ...
[1 reply] : First let's talk about some basic stuff. Root is a global, so: Tree ... (by dhayden)
by Skkahn
COMPUTER ORGANISATION AND ASSEMBLY LANGUAGE
 
Can anyone help with this program. Write a program that takes input of 5 numbers from the user and print the sum of the elements in the array?
[3 replies] Last: COMPUTER ORGANISATION AND ASSEMBLY LANGUAGE Why? Why is this the tit... (by Ganado)
by L404
overloading
 
Hello guys I am trying to overload i want to do this Pokemon somePok; somePok[new Pokemon{ "PIKACHU", 100 }, new Pokemon{ "CHARMANDER", 100 }]; and I...
[7 replies] Last: Sorry then, I give up. My preferred design would be: // Example prog... (by Ganado)
by volang
Socket recv() error: invalid pointer or size
 
Merry christmas in advance! Hope all is well I got some errors when playing around with memory allocation. (And I dont want to solve it with vector ) ;) in...
[5 replies] Last: Yes, the 3rd parameter is the number of actual bytes available. > rec... (by salem c)
Struct decimal number
 
I have problem making structure decimal number in c++. To be more specific my greatest issue is how to overload (input) >> operator and operation of fast poweri...
[4 replies] Last: I have created my own list, that I want to use for this problem. I wil... (by pajaPatak)
*help me with this program please!*
 
hey guys, there is this program I tend to make but since I am a beginner I cant make it right. it's the countries game, in with user should enter at most 20 co...
[4 replies] Last: PLEASE learn to use code tags, they make reading and commenting on cod... (by deleted account xyzzy)
December 2019 Pages: 1234... 10
  Archived months: [nov2019] [jan2020]

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