cin EOF Linux
ÎÒΪʲôдÕâ¸öÌâÄ¿ÄØ£¬ÒòΪÎÒ½ñÌìҪдµÄ²©ÓëÕâÈýÕ߶¼ÓйØϵ£¬ÖÁÉÙÎÒ¸öÈËÈÏΪÊÇÕâÑùµÄ¡£
ÓиöÈËÎÊÁËÒ»¸öÕâÑùµÄС³ÌÐò£¬ËµÓÐÎÊÌ⣺
#include <iostream>
#include <vector>
#include <string>
using namespace std;
int main()
{
vector <string*> spvec;
string str;
cout <<"input string" <<endl;
while(cin>>str)
{
//cin>>str;
string *pstr=new string;
*pstr=str;
spvec.push_back(pstr);
}
vector <string*>::iterator it=spvec.begin();
while(it != spvec.end())
{
cout <<**it <<" " <<(**it).size() <<endl;
++it;
}
it=spvec.begin();
while(it != spvec.end())
{
delete *it;
it++;
}
return 0;
}
Õâ¶Î³ÌÐòÎÒÈÏΪÊÇûÓÐÎÊÌâµÄ£¬ÎÒÔÚVS2008ϺÍubuntu g++ 4.4.1ÏÂÊÔ¹ýÊÇûÓÐÎÊÌâµÄ¡£Ïë²»Ã÷°×ÄÇÈËÊÇÔõÑùµÄ¡£ÎÒ¾õµÃÊÇËûÔÚÊäÈëEOFʱ³öÁËÎÊÌâ°É¡£ ÔÚWindowsÏÂÓà Ctrl+Z , ÔÚLinuxÏÂÓà Ctrl+D .
ÎÒ¾õµÃ¾ÍÊÇËûÔÚLinuxÏÂÊäÈë³öÁËÎÊÌâ¡£
Ïà¹ØÎĵµ£º
¡¡¡¡Äں˼ò½é
¡¡¡¡??Äںˣ¬ÊÇÒ»¸ö²Ù×÷ϵͳµÄºËÐÄ¡£Ëü¸ºÔð¹ÜÀíϵͳµÄ½ø³Ì¡¢ÄÚ´æ¡¢É豸Çý¶¯³ÌÐò¡¢ÎļþºÍÍøÂçϵͳ£¬¾ö¶¨×ÅϵͳµÄÐÔÄܺÍÎȶ¨ÐÔ¡£
¡¡
¡¡??LinuxµÄÒ»¸öÖØÒªµÄÌصã¾ÍÊÇÆäÔ´´úÂëµÄ¹«¿ªÐÔ£¬ËùÓеÄÄÚºËÔ´³ÌÐò¶¼¿ÉÒÔÔÚ/usr/src/linuxÏÂÕÒµ½£¬´ó²¿·ÖÓ¦ÓÃÈí¼þÒ²¶¼ÊÇ×ñÑGPL
¶øÉè¼ÆµÄ£¬Ä㶼¿ÉÒÔ»ñÈ¡ÏàÓ¦µÄÔ´³ÌÐò´úÂë ......
ÕâƪÎĵµÊµÓÃÐÔºÜÇ¿£¬Ëü²»Êǽ²Ä³¸öÃüÁîµÄ²ÎÊý¾ßÌ庬Ò壬¶øÊÇ´Óʵ¼Ê
¹¤×÷µÄ½Ç¶ÈÀ´¿¼ÂÇ£¬Íê³Éʲô¹¤×÷ÐèҪʲôָÁî¡£
ÏÂÃæÊÇÎÒÃǾ³£Òª×öµÄһЩÊÂÇé¡£ÔÚÏÂÃæ¾ßÌå²ÎÊýÒâÒå²»½âÊÍ£¬ÒªÁ˽âÕâЩ
¿ÉÒÔ²éѯ¸ÃÃüÁî°ïÖúÎĵµ
1. ´´½¨Ä¿Â¼
mkdir
NO1. ÔÚµ±Ç°Â·¾¶´´½¨Ò»¼¶Ä¿Â¼
[root@rehat root]# mkdir test
NO2. ÔÚµ±Ç°Â ......
The original /etc/sysconfig/i18n file is:
LANG="en_US.UTF-8"
SYSFONT="latarcyrheb-sun16"
if we want to change locale to be japanese, just follow the instuction below.
body { margin: 0 0 0 0; padding:0 0 0 0 }td,div { font-family:Times New Roman;font-size:11pt;vert ......