#include <iostream>
#include <stdio.h>
#include <string.h>
int main()
{
std::string strList;
int itemCount = 10;
int u8Index = 0;
unsigned char myVar[10] = "abcdefg";
for(u8Index = 0; u8Index < itemCount; u8Index++)
{
std::string res(myVar, myVar+strlen((char*)myVar));
strList.append(res).append("\n");
}
std::cout << strList ;
}
No comments:
Post a Comment