Beginners - May 2018 (Page 8)

Project to calculate money and time to spend all of it.
Hello, I'm trying to make a program that would calculate a certain sum of money and how long it would take you to spend it. This is a very sloppy rough draft. I...
May 17, 2018 at 1:16am
[14 replies] Last: struct ForceCommas : std::numpunct<char> { char do_thousands_sep... (by SmokeyBear)
by kainev
Visitor pattern: To cast or not to cast
Hi all, I've just started using C++ (from Python/Java), I'm trying to implement a basic visitor design pattern to be recursively used on a tree data structure....
May 17, 2018 at 12:53am
[10 replies] Last: > Surely if the Accept method is marked const, you would have to chang... (by JLBorges)
by wsme
Strings without <string.h>
Hey all, Wanting to use char* or char as a string as I had in a recent class, but am unable to remember how it was done in the class. I remember most of the...
May 16, 2018 at 11:26pm
[11 replies] Last: I'll try those, then see how things go from there. Thanks for the help... (by wsme)
How to treat previous/tail on doubly linked lists?
I am having some troubles on logic for implementing both previous and tail on a doubly linked list with nodes. Could someone help me with this? My node setup...
May 16, 2018 at 8:16pm
[8 replies] Last: @keskiverto & @jonnin thanks!! For @icy1 : you're right. I got t... (by An Integer)
Trying to understand functions + arrays
Hey guys, I'm currently taking a beginner C++ class and failing to understand how arrays and functions work together, I have a test coming up soon and the teach...
May 16, 2018 at 7:24pm
[5 replies] Last: because it did not pass by reference. what it really does, broken dow... (by jonnin)
make_unique an abstract class
is it possible to make_unique an abstract class ? i.e //A is an abstract class std::unique_ptr a = std::make_unique< A >( A ); note : What I am try...
May 16, 2018 at 5:27pm
[5 replies] Last: yeah, I know that reference_wrapper does not create, because it is jus... (by Flaze07)
What should I be using to create 2D games and GUIs?
I've looked into different libraries and I started on SDL2 because of its good support and simplicity. Just kind of want some opinions on if I should be learnin...
May 16, 2018 at 4:59pm
[2 replies] Last: Are you talking about making a 'windowed' 2d game, like windows solita... (by jonnin)
by jxo
C++ string converting
i am asked to write two c++ programs , the first asks the user to enter a character string that consists of numbers ranging from 0-255 separated by a single das...
May 16, 2018 at 3:47pm
[7 replies] Last: I have one suggested change to Andy's and icy's programs. Use a for l... (by dhayden)
by AL88
Trying to fill an array with enums
Hi. I'm trying to fill the array with enums, why aren't the if else statements responding? #include<iostream> using namespace std; int main() { ...
May 16, 2018 at 3:28pm
[4 replies] Last: well, let me preach on it lol. if this is indeed tic-tac-toe, that bo... (by jonnin)
C++ backtracking doesn't seem to work
Hello guys! I'm a newbie in programming and i really need your help. I've been trying to learn backtracking for about 3-4 days now and i must say that i fi...
May 16, 2018 at 3:16pm
[8 replies] Last: Hello cplusplusnightmare, Sorry I got behind here. I do agree with tp... (by Handy Andy)
Please help me begin this question. I don't even know where to start
The largest value is -1
May 16, 2018 at 12:09pm
[14 replies] Last: @FurryGuy Oh I see... Pardon my confusion. @icy1 (laughing!) Progra... (by Manga)
How to delete a character from each word in the sentence
i was trying to do a program that ask you how many characters you wish to delete from each word as example: you enter the sentence : HI HOW ARE YOU delimiter(st...
May 16, 2018 at 10:58am
[1 reply] : If c-style strings with std::strtok() must be used, something like t... (by JLBorges)
by egroj1
Nested loops
Hi ! i'trying to output a list like this: 255-255-0 to 255-255-64 ----> 255-254-0 to 255-254-64 ...... 255-0-0 to 255-0-64 254-255-0 to 254-255-64 ...
May 15, 2018 at 10:08pm
[8 replies] Last: Hello egroj1, I came up with this. See what you think of it: for (... (by Handy Andy)
by jbohol
Advantages and Disadvantages of C++
Hello Masters, Greetings! I'm reading some articles regarding c++ Vs C# and i saw this disadvantages of C++. Can someone of masters explain the below disadvan...
May 15, 2018 at 9:01pm
[15 replies] Last: [quote=Ganado]"the safe part" of C# Perhaps I should have said, si... (by Ganado)
access single element in vec3d
I have this code that store 3d coordinates in vec3d. Now I am trying to find the average of max & min value in first column (which is c in my vec3d) then let ...
May 15, 2018 at 4:46pm
[11 replies] Last: Didn't just want to make a comparator to sort based on Y, then X, then... (by icy1)
CreateThread problem
I have quite a big MFC application at my disposal which I want to break down to the stuff I actually need. However I am just using Standard Windows Libraries. ...
May 15, 2018 at 4:17pm
[3 replies] Last: Why don't you use AfxBeginThread ? https://www.codeproject.com/Article... (by Thomas1965)
Simple array problem plz help
Hi!! im new to c++ and i would like to know how to write a program to read string, but only read a to z, not the , ' ' + ! etc. and store them into an array s ....
May 15, 2018 at 3:35pm
[2 replies] Last: Hi Newbieess -- post what you have so far inside tags... This... (by icy1)
Class constructor question.
If I use an initializer list to initialize most of my member variables, but I have one data member that needs to be initilized through another function, what wo...
May 15, 2018 at 2:16pm
[4 replies] Last: Furthermore, Foo::Foo( Bar x ) : foo( x ), // foo has now been comple... (by keskiverto)
Calling function in switch case help
My program: It is a very basic calculator. you have to enter 2 numbers and then either type "a" for adding and "m" for minus. Problem: I have encountered som...
May 15, 2018 at 12:27pm
[17 replies] Last: Oh I get it, it is a good way to make code more simple. (by closed account 3RMzT05o)
Need help exiting a while loop
Hello everyone, I am currently writing a code that is supposed to take the users miles driven and gallons used to produce the MPG. I have majority of the code d...
May 15, 2018 at 12:13pm
[2 replies] Last: I see, thank you so much! (by Ceadric)
May 2018 Pages: 1... 678910... 19
  Archived months: [apr2018] [jun2018]

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