General C++ Programming - December 2017

dynamic allocation of nodes
 
hi all, i want to create a tree-like structure, made up of connected nodes. each node has a mother and a father node, and possibly everal children. all nodes ...
[1 reply] : ... (by ne555)
Understanding a compilation error
 
Hi, I was getting confused with the usage of "new" in case of shared_ptr. (1)shared_ptr<int>sharedPointer(new int (7)); This one works fine. (2) sh...
[3 replies] Last: > the difference in both the cases ? Case (1) std::shared_ptr<int> ... (by JLBorges)
by sarune
Changing order of digits
 
Hello. I have to change order of digits. For example, in text file (*.txt for example) there are "799 938", and in the end I have to get result "997 839" in res...
[4 replies] Last: Forgot to mention that numbers have to be int. Duthomhas, thank you, I... (by sarune)
Help understanding algorithm implementation
 
I'm writing an Linear probing remove function according to notes but my implementation seems to be off because its returning false for valid searches. I was won...
[2 replies] Last: Sorry didn't update thread, the error actually lied in the way I did m... (by tabris17)
iOS framework not export some classes
 
Anyone can help with this problem? https://stackoverflow.com/questions/48018609/objectivec-framework-not-export-some-classes With the debug version works. B...
[no replies]
stacks,error:no response on stdout.
 
#include <cmath> #include <cstdio> #include <vector> #include <iostream> #include <algorithm> #include <stack> #include <string> using namespace std; ...
[8 replies] Last: Im quiting this topic ,there is a similar in Begineers forum: http:/... (by BearDone)
helgrind shows race conditions with atomic types
 
Hi there! Valgrind tool helgrind is reporting some race conditions with atomic variables. If you run the code in this link : http://www.cplusplus.com/referenc...
[1 reply] : Helgrind does not understand standard C++ (or for that matter C11) mem... (by JLBorges)
by dbag
static method and fatal error LNK1120: 1 unresolved externals
 
I have created the following test to try and implement a static method to expose a static variable that I am usually able to do in C# in 2 seconds. The concepts...
[5 replies] Last: @Peter87, Ahh. The light bulb finally clicked. Thank you Peter that wa... (by dbag)
by dbag
Friend Function
 
Hi. I am new to C++, coming from C# and Vb.NET. I have been trying to discover through book explanation and other online references exactly how to implement thi...
[5 replies] Last: You need to declare the function outside the class in TestClass.h, in ... (by Peter87)
Constructor Error
 
I am getting a syntax error in my program while calling a parameterised constructor. The error is: no instance of constructor matches the argument list. I und...
[5 replies] Last: but i still don't know how to pass a vector by reference Exactly t... (by Repeater)
pattern
 
A user inputs an integer number.
[5 replies] Last: Since OP is gone, I might as well post my solution too. #include <c... (by Duthomhas)
{“error”:“Invalid API key\/secret pair.”} API POST request with C++ and libcurl
 
I don't think I'm conforming to the Poloniex API rules. I don't know if it's just me, but they are seeming to make it more complicated than what it really is...
[7 replies] Last: If anyone needs additional information I'd be happy to give it. (by JohnDeBord)
by dbag
VS Command Line Arg to string
 
I have been going through a couple books trying to learn C++ as I am a C# developer by trade. I have gotten some code to work but would like to understand why i...
[8 replies] Last: Microsoft use that non-standard form of main() because it's consistent... (by kbw)
CDF problem with <cmath>
 
Hi guys! I'm studying the book 'C++ for Quantitative Finance' and implementing the first example Vanilla Option, but in the function to calculate call / put op...
[3 replies] Last: Thanks a lot, AbstractionAnon and jonnin, using the function indicated... (by anjoazul)
Trouble following the article on how to develop an OS with C++
 
Hello! So, I am following this article: http://www.cplusplus.com/articles/zv07M4Gy/ I find myself troubled in the "how to compile it" section. It says to run t...
[4 replies] Last: Hahahaha the cross-compiler part itself its impossible to make it thro... (by xXxRevolutionxXx)
Problem with node deletion
 
I am trying to implement a simple linked-list and then define a function to remove duplicates from the list. Here is my code : #include<iostream> #include<t...
[4 replies] Last: Thanks everyone for help . It works fine now . Lines 17-18: You app... (by SOURABH PRAKASH PATI)
Repetitive values in map(values)
 
Hello everyone, I am using std::map<int,string> abc i am struggling to find repetitive values in map abc ="i am ok" abc ="i am not ok" abc ="i am d...
[6 replies] Last: Here's code to count and report how many times a string occurs: #in... (by AbstractionAnon)
V shape
 
A user inputs an integer number. A program should output the numbers as demonstrated below. Example:number=11 6 ...
[1 reply] : First step; get the integer number from the user. Your previous quest... (by Repeater)
Inability to instantiate a standard facet
 
Naturally it isn't possible to instantiate a facet, since a facet doesn't encapsulate any specific functionality, instead leaving that to specific classes deriv...
[3 replies] Last: 1) I think Borges' reply has all to do with the facet class, but not w... (by SSteven)
THE CODE ISNT RUNNING PROPERLY
 
THE FOLLOWING CODE IS TO CREATE A 2D ARRAY CONTAINING NO.S 1-9. AND THEN taking A number FROM the user AND REPLACING THAT PARTICULAR number in the ARRAY with ...
[2 replies] Last: OOOOOHHHHHHHHHH!!!! DAMN !! sorry stupid mistake (by pranav gupta)
December 2017 Pages: 123... 13
  Archived months: [nov2017] [jan2018]

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