Beginners - November 2017 (Page 18)

Return a vector of type ...
 
Hello everyone, i'm trying to create a method in a class that return a vector of objects. In the class i create this object vector<CObject> My_Objec...
[5 replies] Last: You're welcome. (by MikeyBoy)
Error with adding entry to array of structs
 
Hello. Currently my program is supposed to take a request from the user, depending on what letter they input. When the user enters the letter I, they should be ...
[1 reply] : subArrayLength doesn't make sense. Use count instead and make sure... (by coder777)
I seek guidance. (>0-0)>
 
Hello, need some help. my task is this: Write a function that finds the smallest number of a given number. Make a program that generates 400 five digit number...
[2 replies] Last: The loop on line 16 generates 89999 values while you want just 400. N... (by coder777)
by ericM
operator+ overload
 
Hello, I am trying to overload the "plus" operator for a class I wrote. Now, I set a namespace with some const objects of my class. Here an example cla...
[2 replies] Last: You can't call a method of a constant object if it doesn't have the co... (by Golden Lizard)
Craps game help
 
Hello All. Im having trouble with the "point" part of this program. If the user rolls a result that's other than 7,11,2,3,12, then the program should store that...
[2 replies] Last: To “pause” a program please read here: http://www.cplusplus.com/fo... (by Enoizat)
Console - Edit answer?
 
I am starter in C++ and I made a small program. When I write Edit and press Enter, it asks me to enter the file name to edit (this works). After I write the ...
[1 reply] : You will not be able to edit the output text using just standard C++. ... (by Peter87)
arrays
 
Hello, i need to know how to write two arrays that stores names and numbers, the first one is an array that stores 8 names and the second one stores also 8 sal...
[1 reply] : http://www.cplusplus.com/doc/tutorial/arrays/ (by Chervil)
CAN WE POST A PICTURE ?
 
i have a problem about codeblock : you just can understand when i post the screen'photo on this website .But the point is that i do not know how to post photos...
[1 reply] : Upload to some other picture hosting site and post a link here. But be... (by Chervil)
hello - an upside down triangle
 
hello , i am trying to program for school an upside down triangle . so far succeded but have some problem with it. first one is that the rows of the triangle go...
[1 reply] : This is the correct way to do it. There is nothing wrong with this exc... (by goldenchicken)
How to return int from read character array?
 
I'm not sure how to return the int or how to fix the for loop properly. Trying to return character count. #include <iostream> #include <cstring> using namesp...
[4 replies] Last: Geez. It was staring me right in the face and I couldn't see it. Thank... (by Garribean)
When I run my program, it displays the next line instead of the input.
 
I'm writing a program which should take two user balances, and will subtract the costs of the meals from the person with the higher balance. However, when the p...
[2 replies] Last: Thanks a ton for the help @Repeater, you're a life saver. (by Wilshire)
Nothing happening within the code?
 
Write your question here. #include <iostream> #include <fstream> #include <string> using namespace std; void openFile(ifstream&); int main() { ifst...
[1 reply] : You need to actually read something from the file. Line 26: whil... (by Chervil)
Warning: Reader is depreciated "Use CHARReader instead"
 
I'm trying to run this JSON parser and I'm reading this error: // main.cpp #define CURL_STATICLIB #include <cstdint> #include <iostream> #include <memory> #i...
[1 reply] : Okay I fixed it I think but now I'm getting a new error: Jso... (by DragonflyBeach)
I have no clue where to even begin on this HW Assignment.
 
The code is attached below for class for complex number. Provide operator overloading functions to facilitate the following operations on any complex numbers A,...
[no replies]
i need help fast please
 
please explain me why I need to use x1 here: #include <iostream> using namespace std; int main() {int x,x1; int s,p,nr; cout<<" x= ";cin>>x; x1=x;...
[3 replies] Last: and there? You modify ”x” and “x1” in two differen ways, so ... (by Enoizat)
please help me with this error
 
#include <iostream> using namespace std; int main() {float x,y,z; cout<<"care este valoarea laturii x a triunghiului?"; cin>>x; cout<<"care este valoarea latu...
[7 replies] Last: please explain me why I need to use x1 here: You modify “x1” in ... (by Enoizat)
Segementation Fault Mystring class
 
I am using c-strings and dynamically allocated memory to create a simple string class. I am almost there, but now I am getting a segmentation fault when I run i...
[6 replies] Last: still getting the segmentation fault friend istream& operator>> (i... (by Enoizat)
I need to adapt my lottery ticket program. HELP
 
I was assigned to write the following program : Create a program that automatically picks six lottery numbers for each dollar a customer pays. The first five ...
[no replies]
Help ! Lottery ticket program.
 
I need to write a program that create a lottery ticket with six random numbers for each dollar that the user input. The first 5 being from 1-50 included and the...
[no replies]
Printing out number of vowels found in a string
 
I'm trying to write a program where the user inputs a string and the number of words in the string and number of vowels is printed out. I already got the wordCo...
[2 replies] Last: 1. Why are you using both cin >> str1; and cin.getline(str1, size);... (by Chervil)
November 2017 Pages: 1... 1617181920... 33
  Archived months: [oct2017] [dec2017]

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