??C++???????????
???????????? ???????[ 2014/3/26 11:25:58 ] ????????C++ ???? ???
?????????λ??????????????????????????????????????????????????????????С?????????????????????δ???????????“????”??
???????????????????????????????
????????????????????μ?汾?????????????????????????????????ó?????????????????????????????????????ио?????????????????????????????????????????Щ?????y?????????????????????????????????е??????
???????????????
#include <iostream>
#include <cstdlib>
#include <ctime>
using namespace std;
class shaizi
{
public:
void yaodian();
private:
int a;
};
int main()
{
cout << "????????" << endl;
shaizi s1;
s1.yaodian();
return 0;
}
void shaizi::yaodian()
{
int x;
srand(time(0));
x=rand()%5+1;
a=x;
cout<<a;
}
???????д????????
#include <iostream>
#include <cstdlib>
#include <ctime>
using namespace std;
class shaizi
{
public:
int getdian();
private:
int dian;
};
int main()
{
shaizi s1;
cout << "????????" <<s1.getdian()<<endl;
return 0;
}
int shaizi::getdian()
{
srand(time(0));
dian=rand()%6+1;
return dian;
}
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11