Beginners - September 2018 (Page 7)

ATM program set assignment
 
Please post ATM.h. Also, please edit your post and add code tags to the code. Just highlight the code and click the "<>" button to the right of the edit wind...
[2 replies] Last: Do not erase your posts. Now others cannot learn from your mistakes. T... (by keskiverto)
Write a program that displays a subject summary
 
Write a program that displays a subject summary. Use an object to get the summary of the subject. I'm not actually asking for codes. This is the header. ...
[3 replies] Last: See: https://www.artima.com/cppsource/streamstringsP.html The member ... (by JLBorges)
my Computer science assignment
 
.Welcome to Sally's One Stop Tile Shop! Sally's One Stop Tile Shop specializes in tiles imported from Spain, Italy, Brazil, and other countries. After purchasi...
[2 replies] Last: Hello pops9432, I have loaded your program and made some changes beca... (by Handy Andy)
USING ARRAYS AND IMPLEMENTING IN FUNCTION
 
So I have a function called parseDOB, DOB meaning date of birth that extracts each part of a date of birth such as day/month/year and it sets it to day month an...
[1 reply] : std::string ATM::month_string() const { static std::string month_... (by JLBorges)
by mJueL
Help with class, std::cin and random number generator
 
I am to stupid :) I would like to give the class a "seed" which it use for the random number generator. Can you help me. Please rewrite the code, because I d...
[4 replies] Last: Thank you so much, dhayden :) (by mJueL)
Need help fixing my loops!
 
My while loop (in the middle) and do loop (the very end) don't seem to be working right can anyone give me advice? The second loops objective is to count the in...
[3 replies] Last: Thanks for the advice and you're exactly right this is an assignment f... (by daltonphelps0)
debug assertion failed
 
Trying to print 10 random sentences. Sometimes it works and sometimes i get this debug assertion failed expression (L"buffer is too small"&&0) ALSO can't...
[2 replies] Last: Your for loop is wrong. 1 < 10 will always be true. main should return... (by Thomas1965)
poninter to member error
 
What's wrong with that? #include <iostream> struct Foo { Foo(int val = 9) : ptr(new int(val)) {} int * ptr; }; int main() { Foo* foo =...
[3 replies] Last: #include <iostream> struct Foo { Foo(int val = 9) : ptr(new int(v... (by Repeater)
Simple access violation example.
 
Hello everyone, I'm not a complete beginner in computers but I took a long break from them due to life's requirements including children etc... Anyways,...
[4 replies] Last: The code above is just a simple example to understand pointers further... (by jpm2mpj)
Sieve of Eratosthenes Twin Prime Numbers
 
Hello, I'm trying to print the number of twin prime pairs from the prime numbers that are calculated. For certain numbers, the code works as I want it to but fo...
[9 replies] Last: I figured it out keskiverto . Thank you so much! (by AbleMotionz)
Using Variables in Classes
 
The error says error: invalid conversion from 'const char*' to 'char' [-fpermissive] bryansObject.setName("bryan"); and note: initializing argument 1 o...
[3 replies] Last: as what my friend told me, string was used before c++ was updated rec... (by dhayden)
by DellXT
Please, explain the code
 
The main body is especially unclear. https://pastebin.com/aSANRsEL
[6 replies] Last: Thank You. (by DellXT)
Using for loop to add sum of numbers over two intervals
 
I'm having trouble adding up the sum over two values. My assignment is to prompt the user for 1 integer and find the sum of the integers over 1 to what ever the...
[10 replies] Last: As for the += sign... it is just shorthand. int a=1; int b=2; b += ... (by Manga)
How do I accept multiple numbers
 
Write a program that will accept a short value from 10 to 99 and display them per digit (separated by a space). #include <iostream> #include "_pause.h" ...
[5 replies] Last: I've done it. Thank you! (by closed account 9G3v5Di1)
by Blake7
Strings and loops in c++
 
Hello, new programmer here. I'm asking the user for a weekday and then uppercasing it. Then checking (with a while loop) to see if what they typed is actually ...
[2 replies] Last: Thank you! Will do. (by Blake7)
Help understanding this problem
 
Write a program that can divide six non-zero integers (two integers per division) from the user and display the result to the user. Create a function that will ...
[8 replies] Last: noted on this. thank you so much (by closed account 9G3v5Di1)
Segmentation Fault Question
 
Currently working with pointers and from experience, I know that segfaults happen with the poor use of pointers, however, I'm not experienced enough to know why...
[1 reply] : products is an array of pointers that point to... what memory exactly?... (by jonnin)
Passing in an address into a class function
 
I'm doing a grocery store code and we're given a skeleton. I get that an address is passed in since there is a '&' but how would I assign that value to the vari...
[4 replies] Last: Thank you both! (by priscilla96)
Why is Copy Construtor called?
 
I am using an example from Sams Teach Yourself C++ In One Hour a day. The instructor states that passing sayHello by value to the function UseMyString() around ...
[6 replies] Last: That helps a lot. I totally understand now. Thank you so much (by bistelA0005)
Copy Constructor
 
I was wondering how a copy constructor would look like if I had private member variables of vector<Class>. So like a Class items which has private member varia...
[1 reply] : There is no need to define a copy constructor in this case; the compil... (by mbozzi)
September 2018 Pages: 1... 56789... 20
  Archived months: [aug2018] [oct2018]

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