
please wait
by Not a coder
Return nothing from a function having a return type
|
I have a class PackageSingleton and got a function getPackage whose return type is another class Package. class PackageSingleton{ Package getPackage() } ... |
Aug 2, 2018 at 2:49pm
[4 replies] Last: If you return a pointer you need to think about the lifetime of the ob... (by Peter87)
|
by AL88
How can I make the class return the entered string
|
Its compiling but not returning anything. How do i return the string from the class. Thanks. #include<iostream> #include<string> #include<vector> #i... |
Aug 2, 2018 at 12:16pm
[5 replies] Last: Without defining a default constructor, it is still done basically the... (by Manga)
|
by tghatem
Define Class as an array
|
Hi Everyone, I am new to C++, so fare I did more than 1000 lines in Clion (resolution of algorithm, use of matrix, inverse matrix and etc..). I was very satisfi... |
Aug 2, 2018 at 3:56am
[2 replies] Last: Thank you tpb. I moved #include "ZY_Cal.h" from main to Input_Data and... (by tghatem)
|
by clonxy
fstream: reading map
|
I need help using <fstream> to read a file and input the map into a 2d vector The map is: map.txt 9 5 ********* ** **** ** ****** ** u *** ********* The ... |
Aug 2, 2018 at 3:37am
[2 replies] Last: I found the solution. Here it is for people that need it: //David C... (by clonxy)
|
by sgill1998
Calculator pt2
|
I need the loop to continue after "Wrong Expression!" and "Error. Insufficient operators for operands." allowing them to keep entering expressions until they ar... |
Aug 2, 2018 at 2:29am
[4 replies] Last: I know all that, the point of the post is to help me find the other wa... (by sgill1998)
|
by Timmy767676
'else' without a previous 'if'
|
Help me fix my else statement #include <iostream> #include <string> using namespace std; int main() { string operation; int userinput; double tota... |
Aug 2, 2018 at 2:22am
[1 reply] : Please format your code so we don't have to... #include <iostream> ... (by SamuelAdams)
|
Error codes. |
I tried to figure it out but I am still getting E0065 error codes, and E0020 error codes. I am having trouble defining showMenu, showPrice, ItemPrice, and quant... |
Aug 2, 2018 at 1:02am
[1 reply] : Repaste your code within code tags to preserve indentation: your ... (by tpb)
|
by Mc Daniel
Reservation Program
|
Good day, i need help with creating a reservation program. Using this scenario: [You are a Software Engineer working in the IT Department (** Resort) You... |
Aug 2, 2018 at 12:51am
[3 replies] Last: #include<iostream> #include<fstream> #include<windows.h> #include<stri... (by Mc Daniel)
|
by valkjo1
user input causes console to flood
|
So i've been messing around with c++ for a bit now, I noticed that if I have an input (whether it be cin, getline, or scanf) within a while loop, if the user en... |
Aug 1, 2018 at 10:57pm
[6 replies] Last: Thank you for fixing up my code, I wasn't aware of cin.ignore either. ... (by valkjo1)
|
by AL88
Trying to write a simple get and set function
|
Hi im a complete noob and im trying to write a simple get and set function for a class of strings. Can someone show me how to do it and i dont want to use a def... |
Aug 1, 2018 at 10:46pm
[1 reply] : Why do you keep creating new topics for the same question? Respond to ... (by tpb)
|
by Candyfloss
Estimating e using Monte Carlo
|
Hey everyone. I am new to c++. I am really confused as to how to get the estimation of the number e using Monte Carlo. I have searched on Monte Carlo but I stil... |
Aug 1, 2018 at 9:33pm
[2 replies] Last: The Monte Carlo method is to use the mean of a large number of experim... (by lastchance)
|
by Oknel
Need text of void encode( char* buf, int size ); (1,2)
|
Need text of presumably encode.cpp presumably from GCC static library. Known info: void encode( char* buf, int size ); encode( m_buf, m_size ); Need d... |
Aug 1, 2018 at 8:34pm
[20 replies] Last: @MikeyBoy I wish I knew. It is inside the project folder that came fro... (by Oknel)
|
by TheLent
What am i doing wrong?
|
What am i doing wrong im very new to C++ and im just trying some random things. im trying to put a simpel password on the program. #include "stdafx.h" #i... |
Aug 1, 2018 at 8:27pm
[6 replies] Last: XD omg ive heard people like apples........ Thanks i supose i need to ... (by TheLent)
|
by clonxy
class: not reading private variables
|
I need help with my assignment. Some of the objects in my cpp file isn't reading the private variables. Map.h: #ifndef Map_h #define Map_h #include <io... |
Aug 1, 2018 at 8:14pm
[6 replies] Last: Thank you Stewbond, that was really helpful. I made the changes. Curre... (by clonxy)
|
by seungyeon
Lottery number generator
|
So if 69 comes out 69 cannot come out again. That's the type of algorithm. How is this code? I feel like this is not following the algorithm it just uses commo... |
Aug 1, 2018 at 6:39pm
[17 replies] Last: I found it!! Why my code made duplicates!!! And fixed that som bitch!!... (by Manga)
|
by oayrancioglu
After import text file, how to separate lines as strings and integers and also how to store only numbers into an array.
|
Hi, As you see i'm a newbie who studies on GEANT4 simulation program. I need an array which has numbers on it for example my_array . The question is, i expo... |
Aug 1, 2018 at 6:26pm
[4 replies] Last: If you have access to some common unix tools you can do this: grep "^... (by dhayden)
|
by NoobToThis
How could this be done?
|
Hi Below is a section of code that calculates the average of the input that is put into an array. Any number that is in the array is less than average, the cod... |
Aug 1, 2018 at 5:29pm
[4 replies] Last: Thanks. I know I didn't give the entire code but I added these lines i... (by NoobToThis)
|
by AL88
Trying to set a class member string with getline
|
Hi I am trying to build a class of strings so I can experiment with sorting it with std::sort. Why cant i get the setname function to work with getline so i can... |
Aug 1, 2018 at 3:58pm
[2 replies] Last: Use a default constructor for this. Example... #include<iostream> #i... (by Manga)
|
by sgill1998
Segment Fault.
|
Receiving a segment fault need help fixing. #ifndef DNODE_H #define DNODE_H template<class Item> class dnode { public: dnode(const Ite... |
Aug 1, 2018 at 3:44pm
[14 replies] Last: Excellent! You probably already fixed this, but I was looking at dlist... (by tpb)
|
by Doggo Gamo
else without a previous if error
|
So, no matter what i do, i can't seem to be able to fix this error, could someone please help me? #include <iostream> using namespace std; string input1; str... |
Aug 1, 2018 at 3:05pm
[6 replies] Last: Thanks everyone for all the awesome help, it really helps me out. Than... (by Doggo Gamo)
|