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

take argument from command line
 
EDIT: I have made it get my 2 numbers, but now it will not do any of the calculations. Updated code....
[3 replies] Last: [quote=EllMickey]When ran, it will come up as: ./assign1105 and thats ... (by lastchance)
Withdraw numeral amount
 
Hey, everyone, I am trying to create a code that outputs a certain amount of money but can't be less...
[2 replies] Last: Thank you! That was very helpful! (by hendrix33)
Multiplication with linked list hw
 
I'm trying to finish a hw where one of the requirement is a method that takes in two linked lists, m...
[4 replies] Last: Your carry calculations are too complex. carry = value / 10; Use -- ... (by dhayden)
Algorithms in C++ example_06
 
Can anyone explain a bit closer to meg what does the function roterVenstre()do, or actually how does...
[1 reply] : void roterVenstre(int a , int i) { // Roterer elementer mot venstre. i... (by jonnin)
Algorithms in C++
 
I am reading the book algorithms in C++ from Robert Sedgewick Page 112 about Distribution Counting ...
[1 reply] : count[a ] a is being used as an index into count. lets take a simple... (by jonnin)
Program that converts a month and a date to a day of the year.
 
I have to modify the code below to make it work, so when the user types in a month and a date, it co...
[1 reply] : If you ignore leap years, its a fixed computation. make a lookup tabl... (by jonnin)
Why does forward need a remove_reference?
 
Hi, Looking at the definition of std::forward, I do not understand why it is necessary to specify...
[1 reply] : See http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2010/n3143.html... (by Cubbi)
by nre17
when i run it it reads the abort line.
 
//Nicholas El Habr //201800512 #include <iostream> #include <cstdlib> using namespace std; int ...
[1 reply] : Are you aware of how to pass command-line arguments? Open the directo... (by Ganado)
In C++ how to call Windows "Disk Management" and wait until it is closed (completed)
 
I'm using Visual Studio 2019 Community. I'm trying to call the Windows 10 program "Disk Management...
[9 replies] Last: [quote=tigerlcf]cmd /c start /wait diskmgmt.msc Works like I want it t... (by Ganado)
Conflicting data types messing up output
 
I am trying to split binary values into an istringstream and calculate its decimal equivalent into t...
[2 replies] Last: My apologies, I don't know why I went ahead and overcomplicated the ma... (by ddrackley1141)
Expected primary-expressions before 'int' errors
 
Whenever I try to compile and run the code I get an "expected primary-expression before 'int'" error...
[2 replies] Last: > fill_array(int array ); You only need name the array in question... (by salem c)
Parsing data slow in Windows
 
I've posted here recently about reading from a text file and parsing into a vector. I've noticed, af...
[17 replies] Last: Your file is literally a list of numbers (integers and floating points... (by Duthomhas)
Design in C++11/14/17
 
Dear experts, I suppose that there exist proper design beyond conventional object oriented progra...
[9 replies] Last: Dear Niccolo Thank you for your telling great strategy, I keep in min... (by Mitsuru)
by Odglog
Are there any cross-platform console APIs?
 
Hello So I made a text-based game in the console, I used some Win32 API magic in order to do some o...
[9 replies] Last: Thank you so much for the help! :) (by Odglog)
Overloading question
 
Hi, I have the following 2 overloaded functions: void f(int&& x) { cout << "f(int&&)\n";...
[5 replies] Last: I got it. In the sample where an instance of X has a lock to be releas... (by JUANDENT)
C++ Extensions
 
Rob and Jason are joined by Miro Knejp. They first discuss a blog post from Tanker covering their st...
[no replies]
by lexa19
When to dynamically allocate objects?
 
Hi! I am new to this forum and to C++ programming, which I fell in love with :). My question is....I...
[15 replies] Last: thx :) (by lexa19)
Program Ends Before I get chance to input.
 
#include <iostream> using namespace std; struct bessie { int speed; int time; } a ; ...
[5 replies] Last: int diff ; int aposition ; int bposition ; Your default... (by salem c)
Exception thrown using references, but it's fine with pointers
 
Hi. Here is a function that returns a list starting from a tree using the InOrder traversal method ...
[4 replies] Last: you are invoking undefined behaviour. your foot is bleeding because yo... (by ne555)
Replace Words or combinations in a string
 
Hey everyone, I am trying to replace any word in a string with another. The following code works f...
[12 replies] Last: Regex would make this trivial. Use a regex to find all instances to re... (by Duthomhas)
September 2019 Pages: 12345... 7
  Archived months: [aug2019] [oct2019]

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