Click here to Skip to main content
16,010,876 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralChecking a menu item Pin
IGx891-Dec-01 14:47
IGx891-Dec-01 14:47 
GeneralRe: Checking a menu item Pin
Tim Smith1-Dec-01 14:56
Tim Smith1-Dec-01 14:56 
GeneralRe: Checking a menu item Pin
IGx892-Dec-01 8:38
IGx892-Dec-01 8:38 
GeneralCView Pin
Pham Viet Tung1-Dec-01 13:48
Pham Viet Tung1-Dec-01 13:48 
GeneralRe: CView Pin
Nish Nishant1-Dec-01 15:30
sitebuilderNish Nishant1-Dec-01 15:30 
GeneralInsight on STL Containers & One Specific Question Pin
valikac1-Dec-01 12:53
valikac1-Dec-01 12:53 
GeneralRe: Insight on STL Containers & One Specific Question Pin
Chris Hafey1-Dec-01 17:08
Chris Hafey1-Dec-01 17:08 
GeneralRe: Insight on STL Containers & One Specific Question Pin
Todd Smith2-Dec-01 5:29
Todd Smith2-Dec-01 5:29 
FYI if you reserve() data in a vector it doesn't have to allocate after each new insert until you exceed it's limit. And at that point it usually allocates 2x it's current data size (1000 -> 2000 -> 4000 etc.)

std::vector<std::string> data(1000);


as for your deque you can use

std::deque<std::string> data;

ifstream infile("filename);
std::string temp;

while (!infile.eof())
{
    infile >> temp;
    data.push_back(temp);
}


Todd Smith


GeneralRe: Insight on STL Containers & One Specific Question Pin
valikac3-Dec-01 12:48
valikac3-Dec-01 12:48 
GeneralFinding the keyboard and mouse Pin
Winstone1-Dec-01 11:10
Winstone1-Dec-01 11:10 
GeneralRe: Finding the keyboard and mouse Pin
Nish Nishant1-Dec-01 15:34
sitebuilderNish Nishant1-Dec-01 15:34 
GeneralRe: Finding the keyboard and mouse Pin
Hadi Rezaee1-Dec-01 19:06
Hadi Rezaee1-Dec-01 19:06 
GeneralRe: Finding the keyboard and mouse Pin
Nish Nishant1-Dec-01 21:21
sitebuilderNish Nishant1-Dec-01 21:21 
QuestionName of Internet Connection ? Pin
ColinDavies1-Dec-01 9:18
ColinDavies1-Dec-01 9:18 
QuestionIs there an API to add a header/footer to a PDF? Pin
Nish Nishant1-Dec-01 8:58
sitebuilderNish Nishant1-Dec-01 8:58 
AnswerRe: Is there an API to add a header/footer to a PDF? Pin
Rick York1-Dec-01 9:25
mveRick York1-Dec-01 9:25 
GeneralRe: Is there an API to add a header/footer to a PDF? Pin
Nish Nishant1-Dec-01 9:29
sitebuilderNish Nishant1-Dec-01 9:29 
Generaldll example problem Pin
Kuniva1-Dec-01 8:32
Kuniva1-Dec-01 8:32 
GeneralRe: dll example problem Pin
Rick York1-Dec-01 9:24
mveRick York1-Dec-01 9:24 
GeneralRe: dll example problem Pin
Lim Bio Liong3-Dec-01 1:15
Lim Bio Liong3-Dec-01 1:15 
GeneralHyperlink on a dialog Pin
1-Dec-01 7:17
suss1-Dec-01 7:17 
GeneralRe: Hyperlink on a dialog Pin
Michael Dunn1-Dec-01 7:48
sitebuilderMichael Dunn1-Dec-01 7:48 
GeneralRe: Hyperlink on a dialog Pin
Jon Sagara1-Dec-01 7:49
Jon Sagara1-Dec-01 7:49 
GeneralRe: Hyperlink on a dialog Pin
Nish Nishant1-Dec-01 8:14
sitebuilderNish Nishant1-Dec-01 8:14 
GeneralUsing parameters in a MFC app Pin
r2d2rigo1-Dec-01 6:28
r2d2rigo1-Dec-01 6:28 

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.