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

Defining some non-std vectors
 
Hi, Please take a look the exercises 16 and 17 here: https://s2.postimg.org/wyjwt43ll/image.png For...
[5 replies] Last: I get those errors for line 54 where I want to use the overloaded op... (by jlb)
Bubble sorting of an random array
 
Was trying to make sorting of array using bubble sort method. Everything works fine except one thing...
[3 replies] Last: Thank you! Everything works just fine now. (by vsvld18)
Homework Help
 
I'm doing an assignment for my C++ class where I am encrypting data from a file using the Caesar Cip...
[2 replies] Last: Off topic and not a big deal, but this caught my eye: [code firstline... (by doug4)
Pointer and arrays
 
Please refer to the below code Please explain me the line : short* end = a + SIZE; end is a pointe...
[6 replies] Last: But please explain what is happening in It is actually equivalent. ... (by coder777)
reversing a for loop
 
Hey Guys! I have this for loop with this following data 79927398713 and it isn't working for (i ...
[4 replies] Last: Your original post was far from clear. #include <iostream> #include ... (by lastchance)
error value type cannot be assigned to entity type
 
I am getting this error message: error value type cannot be assigned to entity type. Here is my ...
[1 reply] : When asking for help with broken code, it is extremely important to po... (by mbozzi)
white space/formatting
 
So when i input this: Acme Software, Inc. 1000 45.50 56.90 i'm supposed to get: Company: Acm...
[1 reply] : Just add a space in the output format: printf( "\n\nGain or loss: $%... (by Duthomhas)
by kg1020
back to back input and output to stringstream
 
Below code is not working as expected. stringstream ss; int n; ss<<"12"; ss>>n; cout<<n<<endl; ...
[3 replies] Last: Thanks Chervil (6904) (by kg1020)
Convert dollars to euros, pesos, etc.
 
I need to convert 100 dollars to pesos, yens and euros. One US dollar maps to 18 Pesos, 0.89 Euros,...
[5 replies] Last: You need to create some numbers to output, right? So they're going to ... (by Repeater)
basic_istream problem to create cin and wcin template
 
I am trying to code OpenCin function that will open cin ili cwin in the function whether we deal wi...
[3 replies] Last: CHAR_TYPE is the character type. CHAR_TYPE{} is an anonymous tem... (by JLBorges)
Should I create a main.h?
 
When I examine the source code of large programs on github, the first thing I always find before the...
[2 replies] Last: > Would it break anything if I put everything before the main function... (by JLBorges)
by soby96
OCCURENCES IN ARRAY
 
write a program to create an array and fill it up with 20 randomly generated integers (range 0–10)...
[2 replies] Last: THANK YOU! your "pseudocode" was helpful. I was apparently thinking wa... (by soby96)
I cant figure out the program for this question.
 
Kathryn bought 750 shares of stock at the price of $35.00 per share. A year later she sold them for ...
[7 replies] Last: Look at: http://www.cplusplus.com/doc/tutorial/variables/ To displa... (by keskiverto)
Aligning Numbers
 
I am converting a number given by the user to hyperbolic functions, I have the code written I just n...
[1 reply] : #include <iostream> #include <iomanip> #include <string> #include <cm... (by lastchance)
cin problem
 
hey ı tried to work this code #include <iostream> using namespace std; int main() ...
[3 replies] Last: its really easy u just make like this a simple program #include <i... (by xXrandomryzeXx)
Indicating end of an array
 
I'm doing this program that has to read an array of digits of 20, when the user enter -1, thats the ...
[6 replies] Last: Hey thanks heaps, i realised i was skipping something. SOLVED!! (by haddaauk)
grading test
 
Hello I need help with this program. I am having a problem getting my lowest and highest score to be...
[3 replies] Last: Those instructions are not entirely clear, but it looks like you are b... (by Duthomhas)
Enter twice to stop program
 
How do i make my program stop only when it has scanned two blank lines with getline(cin,input);. Rig...
[2 replies] Last: Press Enter twice to terminate input: http://www.cplusplus.com/forum/b... (by Duthomhas)
Variables not passing too function, help!
 
Hello all, I'm working on a calculator program for complex numbers, and all my functions are working...
[1 reply] : do you know about operator overloading? it is a lot more mathy and pre... (by jonnin)
need program help with the Constructor
 
Write a class named Employee that has the following member variables: • name. A string that hol...
[7 replies] Last: It's not clear what help you're asking for at this point. Did you not... (by AbstractionAnon)
September 2017 Pages: 12345... 11
  Archived months: [aug2017]

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