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

by kijsee
Help with card game in c++
 
I need some help figuring out the last part of my game code. Some of it is in Swedish, hope it's still OK. The one thins I'm missing is having different va...
[1 reply] : else { cout << player1 << "It's a draw!" << endl; cin.... (by Repeater)
by stav
std::ostream protected move constructor?
 
Hi, I'm creating a logger system and I would like to have a AddLogStream function, which i can then use to hand over ownership of an output stream to the logg...
[7 replies] Last: @mbozzi, you're in the right neighborhood, and such thought was consid... (by Niccolo)
Division of integers
 
I want to convert an integer into two separate integers, thousands and hundreds examples: 4796 = 4 and 796 12765 = 12 and 765 If I try using the...
[4 replies] Last: Modular arithmetic is not typically taught in US education until Colle... (by Duthomhas)
by RoyEL1
unpacking type
 
Using Visual Studio IDE, w/ ISO C++17 Standard (/std:c++17) as the compiler language option. #include <iostream> #include <map> using namespace std; int ma...
[1 reply] : You didn't include <string> . (by mbozzi)
split a big dat file to small files
 
Hi, I have a large dat file like this: # a b # c d e f 1 2 3 4 5 6 7 8 # g h # i j k l 9 10 11 33 6 7 I need to split this file based on the inf...
[11 replies] Last: Thanks, it works (by mtbayat)
Data structure
 
What's the best data structure to design a text editor? like how pdfs and Ms word search for a sentence or a word and its multiple occurrences in a very short t...
[5 replies] Last: you are very thorough Niccolo! I enjoy your posts. (by jonnin)
by zapshe
web design
 
That has nothing to do with web design but I suppose. int x; //Declaration int x = 10; //Assignment + Declaration x = 20; //Assignment With a declar...
[5 replies] Last: Obvious spam is obvious, should probably be removed. someone feel free... (by Ganado)
Push array
 
How to push array c++? This is my code, i want get value(array) to use another function .. #include <iostream> #include <conio.h> #include <string> using na...
[4 replies] Last: Yeah, I mean like that @Zaap . Thanks u! (by iipmuhamadikbal)
LAN and WAN software detection.
 
Where can I find actual working "C" source code examples, on the internet, that detects any/all LAN and/or a WAN connection(s) to calling program. Thank...
[5 replies] Last: not everything is nefarious :) Sometimes you just want to map the com... (by jonnin)
Why doesn't the program work properly?
 
Hi. İ want to write forexample "24 and 36 gather.13 and 45 gather" and the program must write 60 and 57. But it is gathering 1. Sentence and again gathering 1....
[6 replies] Last: Thank you so much. (by muhammet484)
by turqo
count char elements from vector string
 
Hi Guys Im trying to check if the string have all the same characters or not if it is same i want to print it out, can some one tell me whats wrong below ...
[7 replies] Last: Zaap, your comparing characters in the same word. That tell you if two... (by dhayden)
a look-alike MS EULA Screen.
 
Hey All!, please, When you install a typical MS package on your laptop, MS shows you their EULA Screen with all their text, and you must agree to it. ...
[3 replies] Last: Typically the dialog box and EULA text are part of the installer, not ... (by George P)
Graph
 
i have code like this : #include <iostream.h> #include <conio.h> int main() { int simpul,garis=0; char A ; cout<<"banyak simpul = "; cin>>simpul; co...
[3 replies] Last: Yeah i mean like this : A-B = 10, A-C = 25, A-D = 30, A-E = 40, B-C =... (by zapshe)
Hangman c++. No errors but strange output.
 
Trying to make a hangman game that replaces the dashes with the correct letter once guessed using parallel arrays. I've spent hours trying to put this together....
[2 replies] Last: I think you missunderstood the way to use a string. string DA_WORD ... (by Zaap)
launch command with input and output
 
Hello, i have a project that im working on for some time now and i encountered a problem. Simply said, i have the main process and i want to launch multiple cmd...
[4 replies] Last: I'm sorry for the very late reply, i was gone some days and i was work... (by CosminPerRam)
by dendi
Approach for simple problem - Beginner
 
Joe is fond of chocolates. He has initially A dollars and a single chocolate costs B dollars but Joe cannot buy more than C chocolates. Find the number of choco...
[1 reply] : int main() { //Our Constant Variables, Numbers from your exam... (by zapshe)
by naufal
cholesky decomposition
 
Hi, I would like to solve a complex hermitian positive definite matrix using c++. This is my code. Luckily, there is no error, but it gives me an accurate answ...
[4 replies] Last: You will find it considerably more easy to copy whole arrays if you us... (by lastchance)
by piotr5
same name for type as for an array-variable
 
obviously it is possible to use same name for type and for variable-name. compiler doesn't mind. however: delme-nameclash.c: In function 'int main()': delme...
[1 reply] : The fact that GCC issues a diagnostic message for this code (which bec... (by AndreyT)
by piotr5
keyword "class" is inconsistent?
 
class c {int i,j,k;}; class c; int main(){} this simple program has no problem to get compiled. for example first line could be in a header and someone d...
[4 replies] Last: It is not clear what you are expecting this to do. The standalone c... (by AndreyT)
by naufal
generate hermitian positive definite matrix
 
Hi, I would like to generate a hermitian positive definite matrix Z based on random rayleigh fading channel matrix H. The rayleigh fading channel with i.i.d...
[3 replies] Last: Thank you. (by naufal)
July 2019 Pages: 12345
  Archived months: [jun2019] [aug2019]

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