Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

0 Endorsements
~569 People Reached
Favorite Forums
Favorite Tags
c++ x 7
Member Avatar for vampersie

#include<iostream> #include<string> using namespace std; class A{ private: string id; string work; // same as class B int salary; public: void getid(string _id){ id=_id; } string returnid(){ return id; } void getwork(string _work){ work= _work; } string returnwork(){ return work; } /* if i need to use the data of …

Member Avatar for vampersie
0
118
Member Avatar for vampersie

Now, i input 1.5, obviously, it will show 1. But how can the program check that i just input 1.5 so that it will show an error for non integer input? #include<iostream> using namespace std; int main(){ int k; cout<<"Input: "; cin>>k; cout<< k ; }

Member Avatar for saeidzamani
0
146
Member Avatar for vampersie

/*Why i can't match the input with the constant string array? It always shows the record with -1 Thank you.*/ #include<iostream> #include <fstream> #include <iomanip> #include <cstdlib> #include <cstring> #include <string> #include <windows.h> #include <cmath> string stuname[3]={"Chan Tai Man, Peter","Ng Fat Tat", "Tsang Chi Wai"}; void searchStudent(){ string search; int …

Member Avatar for deceptikon
0
104
Member Avatar for vampersie

Hello, i am a newbie. Now i got a problem about Extracting some specific strings from a txt file. Here is the txt file like: 121348319B'\t'Herman Gerrand'\t'ED001' 'C'\t'ED002' 'A ED003' 'B'\t'ED004' 'C 124311431B'\t'Shakes Hand'\t'ED021' 'F'\t'ED003' 'C ED007' 'A'\t'ED011' 'B 124134131B ....go on The sequence logic is: student ID'\t'student name'\t'subject code' …

Member Avatar for tinstaafl
0
201