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

Repl.it - String Error
Hi guys I use repl.it c++ online IDE to practice my coding. I have some issues. 1) When I include <string> the IDE does not let me use strings. Does anyone...
Aug 26, 2019 at 4:01am
[3 replies] Last: You'll get substantially better help if you provide a small, reproduc... (by mbozzi)
Basic vector qeustion
What does the mean? vector<int> desks ;
Aug 25, 2019 at 6:46pm
[7 replies] Last: @afatperson, It would probably move the discussion forward in a bette... (by Niccolo)
FINDING MAX VAL IN A OBJECT
Hi A vector contains a few object, in those objects a certain member type is age which is a number. How to find the max age from the vector of objects using ...
Aug 25, 2019 at 3:11pm
[2 replies] Last: You know about the algorithm and thus you can read: http://www.cpluspl... (by keskiverto)
Set Insert Iterator?
fin >> k; gr.insert(--k); what does this code mean?
Aug 25, 2019 at 1:40pm
[9 replies] Last: fin >> k; gr.insert( --k ); is same as fin >> k; --k; gr.insert( k ... (by keskiverto)
Not sure why minute detail causes error in code?
#include <fstream> #include <vector> #include <set> #include <queue> using namespace std; vector<set<int> > groups; set<int> gr; vector<int> belong ; queue<in...
Aug 25, 2019 at 1:20pm
[1 reply] : "minute detail" ... not true has only " minute " difference from tr... (by keskiverto)
Forcing programming structure via virtual functions.
Hello, I'm developing an extensible software framework, and I'm at a loss about implementing some features of the framework. To summarize, the framework I...
Aug 24, 2019 at 8:49pm
[14 replies] Last: Please don't take my following point as a raw "I told you so", I don'... (by bayindirh)
#Define for building functions alternative
Hi, So, I'm working with a piece of code that is not mine, but uses #define SPELL(func) i32b func(i32b level, Charact *ch, Charact *victim, Object *obj, ...
Aug 24, 2019 at 6:21pm
[12 replies] Last: it may also be possible to use the existing code to just generate what... (by jonnin)
Migration of a C++ application to a newer server with latest Redhatlinux version
Hi, I need to move an application on a redhatlinux to another server having latest redhatlinux version( details of the version is unknown for the moment). The ...
Aug 24, 2019 at 6:16pm
[2 replies] Last: My suggestion is to just sandbox it. make a new machine with the new ... (by jonnin)
Getting objects through iterators and putting in a Map
Hi I have objects of classes in a vector. While iterating through the vector i want to insert each object from the iterator to a map, with some value. How ca...
Aug 24, 2019 at 5:02pm
[10 replies] Last: or provide some comparisonn function just as with std::unordered_map y... (by ne555)
Pass By Reference - Question
I know the code below will print “123456”. But I am curious on something. In the ref function parameters it takes in *a which is a pointer. Why can’t ...
Aug 23, 2019 at 2:40pm
[5 replies] Last: If you're asking about when a parameter should be a pointer and when s... (by dhayden)
Topological sorting question
Hi, everyone. I'm now working on a topological sorting program, which reads in a data.txt and output the sorting result. However, there are some problems and I ...
Aug 23, 2019 at 2:19pm
[6 replies] Last: std::array needs the size to be known at compile time, not applicable ... (by ne555)
Input file question
Hi, everyone! I'm working on a topological sort problem. I have to read in a text file which contains the information of the graph and output the result to anot...
Aug 22, 2019 at 8:07pm
[2 replies] Last: Thanks a lot, that works :)! (by calvinfornia)
Little Problem to connect Compile Instruction
Dear Community, I have a little Problem to connect Compiler Instructions for g++ on Linux Ubuntu Mint. The Problem is that I can combine not following instruc...
Aug 22, 2019 at 5:20pm
[1 reply] : Did you look at the output after you ran the command? What did it say?... (by Albatross)
putting an object as condition in while statement (1,2)
I am trying to understand how filestream objects work. What does the file passed as a condition in the while loop return wheen running its loop and breaking off...
Aug 22, 2019 at 2:27am
[29 replies] Last: I suppose my final reply to wrap things up. Eh, I wouldn't rely on a... (by zapshe)
how does the sort from algorithm work?
I understand that it sorts a vector in ascending order and you can write your own comparator method to specify the sort order, but how does the sort work behind...
Aug 21, 2019 at 11:41pm
[10 replies] Last: Heh, welcome to the old geezers club. :O) I enjoyed playing with sort... (by Duthomhas)
C native android app crashes on Oreo and above due to signal(SIGALARM) call
I have created a C library using Android NDK and created an apk using this prebuild library. This apk calls the foo() function of the library. In this library ...
Aug 21, 2019 at 7:02pm
[2 replies] Last: why stack only? Heap, used as shown above in the static example, is j... (by jonnin)
Topological sort question
Hi, everyone. Here is an introduction of topological sort program, There's an input file indicating the layer constraints in the following format: 5 1 2 3 4 5...
Aug 21, 2019 at 5:15pm
[6 replies] Last: 4 < 3 < 1; 2 < 5 alll constraints are respected OK. I think I get ... (by doug4)
by P13r0
Help on a (probably) "custom" CRC
Hi all, and thank you in advance for your help. Here's my issue. I was recently given a small router (GO-DSL-AC750), and I'm trying to modify it's firmware. My...
Aug 21, 2019 at 10:47am
[8 replies] Last: Ok, a good friend of mine did it :) int main(int ac, char** av) { ... (by P13r0)
Get Outlook contacts from C++ application
Hi, I need a C++ application to get Outlook contacts (from my local Outlook application) I found this old example: https://www.codeproject.com/Article...
Aug 21, 2019 at 9:22am
[7 replies] Last: Just if usefull for anyone, I found how to compile the code here: htt... (by ddonate)
Save hex address of a int32 (savepos)
how can i save hex address? for example, i have a int32 int32 UncompressedSize ; how can i save position of UncompressedSize block?
Aug 21, 2019 at 6:27am
[8 replies] Last: Oh! Are you reading into UncompressedSize from a binary file? http://... (by Albatross)
August 2019 Pages: 1234... 6
  Archived months: [jul2019] [sep2019]

This is an archived page. To post a new message, go to the current page.
Registered users can post in this forum.