Click here to Skip to main content
15,893,722 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How i can save DC in Hbitmap...so i can use it Cimage...in SDI MFC Pin
humais2-Jul-10 8:54
humais2-Jul-10 8:54 
GeneralRe: How i can save DC in Hbitmap...so i can use it Cimage...in SDI MFC Pin
CPallini2-Jul-10 9:21
mveCPallini2-Jul-10 9:21 
GeneralRe: How i can save DC in Hbitmap...so i can use it Cimage...in SDI MFC Pin
humais2-Jul-10 9:29
humais2-Jul-10 9:29 
GeneralRe: How i can save DC in Hbitmap...so i can use it Cimage...in SDI MFC Pin
CPallini2-Jul-10 10:22
mveCPallini2-Jul-10 10:22 
GeneralRe: How i can save DC in Hbitmap...so i can use it Cimage...in SDI MFC Pin
Richard MacCutchan2-Jul-10 22:03
mveRichard MacCutchan2-Jul-10 22:03 
GeneralRe: How i can save DC in Hbitmap...so i can use it Cimage...in SDI MFC Pin
humais3-Jul-10 0:01
humais3-Jul-10 0:01 
GeneralRe: How i can save DC in Hbitmap...so i can use it Cimage...in SDI MFC Pin
Richard MacCutchan3-Jul-10 0:53
mveRichard MacCutchan3-Jul-10 0:53 
GeneralRe: How i can save DC in Hbitmap...so i can use it Cimage...in SDI MFC Pin
humais3-Jul-10 8:28
humais3-Jul-10 8:28 
GeneralRe: How i can save DC in Hbitmap...so i can use it Cimage...in SDI MFC Pin
Richard MacCutchan3-Jul-10 11:07
mveRichard MacCutchan3-Jul-10 11:07 
Questionfscanf Pin
T.RATHA KRISHNAN2-Jul-10 3:29
T.RATHA KRISHNAN2-Jul-10 3:29 
AnswerRe: fscanf [modified] Pin
Cool_Dev2-Jul-10 3:44
Cool_Dev2-Jul-10 3:44 
AnswerRe: fscanf Pin
elchupathingy2-Jul-10 3:58
elchupathingy2-Jul-10 3:58 
AnswerRe: fscanf Pin
CPallini2-Jul-10 5:54
mveCPallini2-Jul-10 5:54 
QuestionRectangle Over An Image Pin
john56322-Jul-10 2:44
john56322-Jul-10 2:44 
AnswerRe: Rectangle Over An Image Pin
bob169722-Jul-10 3:12
bob169722-Jul-10 3:12 
AnswerRe: Rectangle Over An Image Pin
Rozis2-Jul-10 10:32
Rozis2-Jul-10 10:32 
QuestionIterating Vector Pin
T.RATHA KRISHNAN1-Jul-10 21:30
T.RATHA KRISHNAN1-Jul-10 21:30 
Hi!
I've stored my file contents in a Vector of std::string. My file has 55 rows of numbers. I've to get a particular row from the vector. How to do this?

Code:

void CGameMenuPlayerProfileState::setPlayerData(int countryId, int btnId)
{
 ifstream myfile("E://Work//Data//playerdata.txt.txt", ios_base::in);
 std::string line;
 vector<std::string> sets;
 vector<std::string>::iterator it = sets.begin();
 int player_no = (countryId*11)+btnId;

 while(getline(myfile, line))
 {
  //cout<<"File contents moved to Stack!"<<endl;
  sets.push_back(line);
  cout<<line;
 }
}


I've to get a particular player data using the int player_no;. i.e I've to get sets[player_no].
How to do?
AnswerRe: Iterating Vector Pin
Cedric Moonen1-Jul-10 21:40
Cedric Moonen1-Jul-10 21:40 
AnswerRe: Iterating Vector Pin
Stephen Hewitt1-Jul-10 21:45
Stephen Hewitt1-Jul-10 21:45 
GeneralRe: Iterating Vector Pin
T.RATHA KRISHNAN1-Jul-10 22:14
T.RATHA KRISHNAN1-Jul-10 22:14 
AnswerRe: Iterating Vector Pin
Aescleal1-Jul-10 22:29
Aescleal1-Jul-10 22:29 
GeneralSolved Pin
T.RATHA KRISHNAN1-Jul-10 23:16
T.RATHA KRISHNAN1-Jul-10 23:16 
QuestionHelp for Printing? Pin
Le@rner1-Jul-10 20:56
Le@rner1-Jul-10 20:56 
Questiongetline throws exception Pin
T.RATHA KRISHNAN1-Jul-10 18:54
T.RATHA KRISHNAN1-Jul-10 18:54 
AnswerRe: getline throws exception PinPopular
Stephen Hewitt1-Jul-10 18:58
Stephen Hewitt1-Jul-10 18:58 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.