- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 5
- Posts with Upvotes
- 5
- Upvoting Members
- 4
- Downvotes Received
- 3
- Posts with Downvotes
- 3
- Downvoting Members
- 3
14 Posted Topics
Re: the API of getting time are the same on Windows and *nix(UNIX, linux); following codes should meet your requirement [CODE] char lstime[128] = ""; struct tm *lptr = localtime(&time(NULL)); strftime(lstime, sizeof(lstime), "%Y-%m-%d %H:%M:%S", lptr); cout<<lstime<<endl; [/CODE] | |
Re: because every element in the array is also a array,you haven't understand string type array essential; following is what you expected: [CODE]string catalog[][32] = { {"item1 - 0 dollar(s) each","description1"}, {"item2 - 3 dollar(s) each","description2"}, {"item3 - 5 dollar(s) each","description3"}, {"item4 - 7 dollar(s) each","description4"}, {"item5 - 9 dollar(s) each","description5"} … | |
Re: stl has not hash map as I know, you can search some open source ,there are many excellent open source library for hash map | |
Re: vector is a template array, you can insert a element into any where you want; like this [CODE] vector<string>vData; vData[5] = "adfa"; [/CODE] | |
Re: [CODE] srand(time(NULL)); //seed int lino = rand(); //rand number [/CODE] | |
First , introduce myself 4 years of LINUX, C++ network program development experience, LINUX platform engaged in high-concurrent network procedures, mass data processing program; Familiar with modeling tools, process design, and detailed design; Familiar with C++ language, TCP / IP protocol, UDP protocol, ARP protocol and other network protocol development … | |
Re: declare of sort (UList<U>&) don't match it's define parameters are not agreement | |
Re: you must know end punctuation of every sentence, or you can store possible end flags into a container , such as vector or array, search the end punctuation from container and compare | |
Re: what questions do you ask??? I read the code and output result from begin to end , can't acquire any function you want to achieve [CODE]if (SAverage <= 100 && SAverage >= 90)[/CODE] this sentence is right ,syntax and logic | |
Re: add a double type variable ldnumer , the variable receive a double type input numerator 's value is transfered from ldnumer , if ldnumer is a integer, the ldnumer should be equal to numerator , else greater; see follow code: [CODE]int main() { int numerator,denominator; double ldnumer = 0; try … | |
Re: This way achieving the function is more simple and easy to understand [CODE] #include <iostream> using namespace std; int main() { int linum1 = 0, linum2 = 0; char fraction[16] = {'\0'}; cin>>fraction; if(sscanf(fraction, "%d/%d", &linum1, &linun2) < 2) cout<<"input error !!"<<endl; return 0; }[/CODE] | |
|
The End.