回答編集履歴

1

chara_id

2017/07/04 06:26

投稿

tsysrtk
tsysrtk

スコア15

test CHANGED
@@ -1,14 +1,14 @@
1
- int colCount = sqlite3_column_count(pStmt);
1
+ int colCount = sqlite3_column_count(pStmt);
2
2
 
3
3
  while (sqlite3_step(pStmt) == SQLITE_ROW) {
4
+
5
+ std::string chara_id = cocos2d::StringUtils::format("%s", sqlite3_column_text(pStmt, 0));
4
6
 
5
7
  for (int col = 0; col < colCount; col++) {
6
8
 
7
9
  std::string name = sqlite3_column_name(pStmt, col);
8
10
 
9
11
  std::string value = cocos2d::StringUtils::format("%s", sqlite3_column_text(pStmt, col));
10
-
11
- std::string chara_id = cocos2d::StringUtils::format("%s", sqlite3_column_text(pStmt, 0));
12
12
 
13
13
  GameManager::getInstance().characterInfo[chara_id][name] = value;
14
14