Beginners - May 2016 (Page 33)

Bubble Sort Help
 
Hello can someone please help me with my bubble sort code? It doesn't compile for some reason and its suppose to be in ascending order. I would like to know wha...
[9 replies] Last: So sorry for the late reply, but it worked! Thank You so much> (by Supershock01)
how to print a letter inside a series
 
hi everyone, my question is this: how to print the following using C++ loop instructions F12345 1F2345 12F345 123F45 1234F5 12345F
[8 replies] Last: An alternate version without the if statement in the loop: #include ... (by closed account E0p9LyTq)
Trying to get the calcuation for the expenditures to work.
 
I want to make a program for a students monthly budget but I can get the calculation to work. I know actual.gross += actual; is wrong but I am not sure what to ...
[4 replies] Last: Thank you, I did not realize all those mistakes. Thank you so much (by Berseker)
Pointers and Arrays
 
How can I print the array backwards with the pointer already there? instead of it printing out 1,2,3,4,5,6,7,8,9,10 I can't figure out how to print it out ...
[3 replies] Last: int *p; int ar = {1,2,3,4,5,6,7,8,9,10}; p = ar; for ( int i=9; i>0;... (by Moschops)
Read specific column in a line of text file
 
Hi everyone, I have text file like this: 516457 +9989704016796.0 1 516471 +9989844018787.0 1 516481 +9989984013367.0 1 516484 +9990124023453.0 ...
[2 replies] Last: Thanks for your reply Yep, I changed the type into double_t and it is ... (by ajlahmed)
by Phil15
Is it ever a good idea to overload copy constructor
 
Hi quick curiosity question. I am writing a doubly link list program and to copy one node in a copy constructor I created an option of keeping the next and the...
[3 replies] Last: you are not calling the `foo()' function (by ne555)
by abeke
Soccer Game. Please help.
 
Write your question here. #include <iostream> #include <ctime> #include <cstdlib> using namespace std; int main () { const int enemy = 10; int...
[1 reply] : Line 11: You're missing a ) Line 16: You're missing a ; Line 17: ... (by AbstractionAnon)
Sales with Bonus
 
Hello, I'm supposed to create a program with a getSales and calcBonus function with the bonus set to %10 but I keep getting an error that says Id returned 1 exi...
[1 reply] : You want to look at your calcBonus function header. At top you declare... (by Kurisutofaa)
need help on Understanding objects and classes
 
So i need help understanding classes and objects. I know how to declare objects but not sure if im right or not. Here is an example i made up. What i want to kn...
[2 replies] Last: thank you so much! (by chang123)
Formatted output problem
 
Hi, I'm having trouble using 'setw', 'fixed' and 'setprecision()' to get the output to format as I want. The code below is my payslip class. I have an 'employ...
[3 replies] Last: You probably want to use setw() for your variables as well. (by jlb)
by kev558
How to completely clear cin if the wrong type of input is entered
 
I need to take in the value of the number of vertices a shape has and I'm taking this as user input. As this number is later being used to create an array, the ...
[2 replies] Last: Thanks, got it sorted now (by kev558)
Operator overloading question
 
If we look at the following: class test_class { public: struct variables { int var_1; float var_2; } _data; test_class(); ~test_class(); test_cl...
[2 replies] Last: Ah, I understand now. Thank you very much :) (by SamuelGr)
Finding the average words per sentence
 
Hello everyone, I am stuck on this program and its out of my knowledge. I think I about got it but I'm at a dead end and can really use some help or advice. The...
[5 replies] Last: In 1853 the Cunard Co., whose mail-carrying charter Illustrates the... (by tipaye)
Problem with string class
 
Hello everyone. I've been trying to create my own string class, but I've encountered some problems while reading the input(I guess it just went to an infinite l...
[5 replies] Last: @fun2code Thanks, this is really useful. And yes, initially I wanted ... (by jgg2002)
by olaf94
First "large" project
 
So i'm learning C++ for about 4 months now and school had me wite my first project. Now it does what it has to do so far, but i need to be able to save the pro...
[2 replies] Last: Can't make too many comments without seeing more code, for example: I... (by tipaye)
Blank Compilation (Strictly Increasing Array)
 
Hello everyone, I am trying to test a boolean function that is supposed to return "true" if the a specified array is strictly increasing (e.g., {1,2,3...}),...
[3 replies] Last: Thank you tipaye! That was very helpful! (by Pegasus1)
Reading Code Mathematically?
 
Is there some sort of efficient mathematical way by which someone can know what the following will print without testing it on a computer, or going through and ...
[4 replies] Last: Thank you very much! That makes sense. So the way I should approach su... (by Pegasus1)
How to use FLTK with g++?
 
I mean how to compile FLTK, combine with g++ and compile the program
[no replies]
2d Array in function?
 
I've only been coding for a week in a half now. I recently decided the best way to learn would be to set my own goals and work on them. I'm currently working on...
[2 replies] Last: If you want to pass it in as a parameter with it being just a characte... (by Kurisutofaa)
Final Project with Arrays
 
Hi, everyone! I have a final project in my computer science class. It's a simulated game in which you get eleven random letters, each from A-G, and you start on...
[2 replies] Last: You can save them in a string or vector. (by Thomas1965)
May 2016 Pages: 1... 313233343536
  Archived months: [apr2016] [jun2016]

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