General C++ Programming - June 2019 (Page 3)

Sorting Scores from highest to lowest in hangman game
 
I want to sorting scores while the player playing hangman game.. while the player stop the game then in file score.txt will show the score of the player from th...
[1 reply] : Make a function that does this and pick a spot in the code where you w... (by zapshe)
Newbie Boost Question
 
Hey guys, So I have a pretty simple boost server running that: 1) Async_accepts connections 2) Writes to the connection 3) Kills the connection 4) Keep...
[7 replies] Last: @dutch and I often end up thinking the same thing at the same time...:... (by Niccolo)
ty
 
tyvm
[5 replies] Last: @Niccolo, PPM has both text and binary formats. It's basically the sim... (by dutch)
Need help please!!! I am stuck
 
Hi! I am quite new in OOP. I understand the basics and I can create a simple class. But when i get a task to create some class like this one I do not know where...
[3 replies] Last: Create the MACAdress class class MACAdress { }; Default value... (by Ganado)
C++ Projects
 
Any inputs on following questions please: Is C++ going to be used widely by companies in the United States for non embedded programming projects for many more ...
[6 replies] Last: For a job it is actually good to know more than one language. Knowing ... (by coder777)
Building vector recursively
 
Hi, So I'm trying to implement huffman coding I got stuck here: void encode(const std::shared_ptr<Node> &n, std::vector<bool>& code){ if (n->getLeft(...
[4 replies] Last: Oops, my bad, forgot the bracket when transcribing. I fixed the erro... (by zStupan)
2D dynamic array
 
Hello.I have a problem using the 2d dynamic array.Althought i dont see any fault the debugger shows segmentation fault when i'm trying to access the the array u...
[6 replies] Last: Well, i've fixed the code and now it works perfectly.Thanks a lot for ... (by GeorgeGento)
Expand HashTable
 
Hello.I have a problem with my expand function and i cant get it to work.I runned the debugger and it has a segmentation fault at the pointers.The rest of the p...
[4 replies] Last: Thanks for the replies.I've fixed the problem. (by GeorgeGento)
by doug4
Inline functions
 
In a recent thread, @Niccolo made the following statement. Most people assume that is about optimization, but it isn't. It may give a hint to the optimize...
[7 replies] Last: most of the details have been explained already. I would just like to ... (by malibor)
AvlTree
 
Hello everyone.So i have this problem that i cant call my class functions in the main.Any help would be appreciated.I runned Debugger and it says that it has se...
[2 replies] Last: Thanks for the help.I've fixed it and nowit works perfetly. (by GeorgeGento)
by Dexu5
Stuck in an issue.
 
Edit : Have removed the solution to avoid plagiarism in the on going competition! Hey, I've taken up C++ after a long time and have started with dynamic prog...
[4 replies] Last: Haha! Okay, no worries! (by Dexu5)
Creating own library
 
Hello! I am about to start creating my own library for learning purposes! Exciting! It's basically a library for stats/math. I wanted to ask the forum if...
[7 replies] Last: Nice story, Niccolo, I also worked with many custom smart pointers in ... (by jonnin)
Cant change variable from another class
 
Hey I have a very simple problem yet its very hard for me to figure out why I cant change variable value from another class. This is the class I want to chan...
[3 replies] Last: When you get frames to change, consider whether SetNewFrames() should ... (by dhayden)
Stuck
 
Hi Please help So, when i get to this section of code, the while loop doesn't work, the programme just stops, i am wanting the loop to repeat if the user ...
[3 replies] Last: Hi, never mind, I've found my problem, the question was never containe... (by Zainyorkshireman)
Struct has not beed declared
 
Hey guys. I'm currently having trouble accessing a struct from a templated base class template<std::size_t size> class CBase { struct Dummy_Test { float ...
[4 replies] Last: ah thx very much that did help :) I sometimes find it hard to spot my ... (by JuliusCaesar)
Writing Code that Updates Outdated Src Code?
 
I had an idea today and now I'm confused why it doesn't already exist. I'm sure it would be quite difficult but I don't think impossible? I'm told a large porti...
[6 replies] Last: That aside, some trivial " replace words " might be possible. An exam... (by keskiverto)
Help
 
I need help with a problem. Can someone give me an idea? https://www.spoj.com/problems/JUSTAPAL/
[3 replies] Last: I tried to count all characters of the string in one array of 26 eleme... (by steph111)
by wakaka
I got some problem converting the char[] with "some word and bla bla bla"
 
how can i insert an char array with some word? example: MAX .VacationLocation = "LAKE GENEVA";
[8 replies] Last: you can use strcpy, you did something wrong. the loop works too, but ... (by jonnin)
Where is the problem?
 
Who can help me, I get error but I don't understand what I was wrong with #include <iostream> #include <fstream> using namespace std; #define N 101 struc...
[3 replies] Last: for(int i=1; i> a .v; a .p = i; } For one, there's a lot wrong with ... (by Ganado)
Create an executable file from given files
 
Hello there! I will jump in straight to the problem. Take a look at the following scenario: I have a couple of files (.h and .cpp) and a main method in one of t...
[16 replies] Last: #include <iostream> #include <fstream> #include <string> #include <cs... (by lastchance)
June 2019 Pages: 12345
  Archived months: [may2019] [jul2019]

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