ÈçºÎ²éÕÒC·ç¸ñ×Ö·û´®ÖжººÅµÄ¸öÊý
C/C++ code:
const char* p="ab12,32,123,9a"
ÎÒÏë×ö¸öÅжϣ¬²éÕÒÀïÃæÊÇ·ñÓÐÈý¸ö¶ººÅ£¬ÓÐÈý¸öµÄ»°Õý³£return.²»ÊÇÈý¸ö¶ººÅµÄºÃ£¬Ìáʾ´íÎóÐÅÏ¢¡£
лл¸÷λÀ²£¡£¡
±éÀú²éÕÒ¼ÆÊý¡£¡£¡£
strchr()
×îÊʺÏÁË
·½·¨Ì«¶àÁË£º
Öð¸ö×Ö·ûÅжÏ
»òÕßstrstr()
»òÕßstrchr()
µ÷Óÿ⺯Êý£¬»òÕß×Ô¼º°¤¸ö×Ö·û±éÀú
Â¥ÉϵÄ2λ¸ç£¬²»ÊÇÕÒλÖã¬ÊÇÕÒ¸öÊý
´ÓÍ·µ½Î²±éÀúÒ»±é
int count = 0;
while( *p != '\0')
{
if(*p++ = ''')
count++;
}
ǰ¶Ëʱ¼ä»Ø´ð±ðÈËÎÊÌâµÄʱºòÕýºÃд¹ý£¬Äã¸Ã¸Ã¾ÍÄÜÓÃÁËC/C++ code:
#include "string"
#include "iostream"
using std::string;
using std::cin;
using std::cout;
int main(int argc, char* argv[])
{
string strInput = "abc,def,ghi,jkl\
mnos,sadf,asgs\
f,sa,f,sa,fa,sdf";
int nCount = 0; //×ܸöÊý
int *nArray = new int[20];
for(int i = 0, j = 0; i < strInput.length() ; ++i)
{
if(strInput[i] == ',')
{
nCount++;
nArray[j++] = i;
}
}
cout<< "¹²ÓÐ','"<&l
Ïà¹ØÎÊ´ð£º
QQȺ 29152388
ÓÑÇéUP
°ï¶¥
up
°ïup
up Ö§³Ö£¡
up jf
...ÄѵÀÓзÖ..?
up up up
Ï£ÍûÓеüӷ֣¬¹þ¹þ¡£
Ö§³Ö£¬ÎÒ¼ÓÁË£¬Ï£ÍûÂ¥Ö÷ÄܼÓÎÒ£¬¹²Í¬Ñ§Ï°¹þ
¼ÓÁË¡£
¶¥ÉÏ£¬Ã¿ÌìÊÕ»ñÒ»µã£¬Ö§³Ö ......
//C ½Ó¿Ú
extern "C"
{
TESSDLL_API int __cdecl GetTessText(const char *imagefile, char *text);
}
//ÎÒÔÚC#ÖÐÉùÃ÷
//µ÷ÓÃC DLL Öеĺ¯Êý
[DllImport("OCRapi.dll&quo ......
ÇëÎʸ÷λ¸ßÊÖÈçºÎÓÃC/C++»ñµÃϵͳδ°²×°²¹¶¡
ºÃÏñºÜרҵµÄ¶«Î÷¡£¡£¡£
²é×¢²á±í
ÿ¸ö²¹¶¡Èç¹û°²×°Á˶¼»áÔÚ×¢²á±íÀïÃæµÇ¼Ç
ÇëÎÊÄܲ»ÄܸüÇåÎúЩ£¬ÎÒÏëÓÃc\c++²é³öÀ´£¬²»ºÃÒâ˼£¬ÎÒÊÇÐÂÊÖ¡£»¹ÍûÖ¸½Ì¡£Ð»
·ÖÖµ ......
´ó¼ÒºÃ:
ÎÒÊǸãCµÄ, ÏÖÔÚÏëÓÃC Á¬½ÓMYSQL,µ«ÊÇÔõôҲÁ¬½Ó²»ÁË,ÎҵĴúÂëÈçÏÂ:
#include <stdio.h>
#include "C:\Program Files\MySQL\MySQL Server 5.0\include\mysql.h"
......
ÎÊÌâÒ»£º
ÔÚ¶ÔÆëΪ4µÄÇé¿öÏÂ
struct BBB
{
long num£»
char *name;
short int data;
char ha;
short ba[5];
}*p;
p=0x1000000;
p+0x200=____;
(Ulong)p+0x200=____;
(char*)p+0x200=____;
¼ÙÉèÔÚ32λC ......