Click here to Skip to main content
15,902,189 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: ODBC, SqlGetData Pin
Pavel Klocek29-Apr-03 5:29
Pavel Klocek29-Apr-03 5:29 
GeneralRe: ODBC, SqlGetData Pin
justin22329-Apr-03 5:55
justin22329-Apr-03 5:55 
GeneralSerialization Pin
Brigg Thorp29-Apr-03 2:12
Brigg Thorp29-Apr-03 2:12 
GeneralRe: Serialization Pin
Nick Parker29-Apr-03 2:47
protectorNick Parker29-Apr-03 2:47 
GeneralRe: Serialization Pin
Brigg Thorp29-Apr-03 3:09
Brigg Thorp29-Apr-03 3:09 
GeneralRe: Serialization Pin
Nick Parker29-Apr-03 4:48
protectorNick Parker29-Apr-03 4:48 
GeneralSuggestion: Serialization Pin
Joan M29-Apr-03 4:42
professionalJoan M29-Apr-03 4:42 
GeneralQuestion about size_type and const_iterator of vector. Pin
George229-Apr-03 1:46
George229-Apr-03 1:46 
Hi, everyone!


I often puzzled about when to use const_iterator of vector
and when to use size_type of vector.

For example, in the following piece of code, we should use
const_iterator instead of size_type.

I want to know whether there are some concrete rules? Easy to
remember ones. Smile | :)

Source Code:

--------
#include <iostream>
#include <vector>
#include <string>

using namespace std;

int main()
{
vector<string>::const_iterator i;
vector<string> Buffer;
Buffer.push_back ("Hello");
i = Buffer.begin();
return 1;
}
--------


Thanks in advance,
George
GeneralRe: Question about size_type and const_iterator of vector. Pin
jhwurmbach29-Apr-03 2:17
jhwurmbach29-Apr-03 2:17 
GeneralRe: Question about size_type and const_iterator of vector. Pin
George229-Apr-03 2:50
George229-Apr-03 2:50 
GeneralRe: Question about size_type and const_iterator of vector. Pin
markkuk29-Apr-03 3:18
markkuk29-Apr-03 3:18 
GeneralRe: Question about size_type and const_iterator of vector. Pin
George229-Apr-03 3:40
George229-Apr-03 3:40 
GeneralDisappearing folders in Visual Studio Pin
Poul Haahr Klemmensen28-Apr-03 23:38
Poul Haahr Klemmensen28-Apr-03 23:38 
GeneralRe: Disappearing folders in Visual Studio Pin
HJo29-Apr-03 0:17
HJo29-Apr-03 0:17 
GeneralRe: Disappearing folders in Visual Studio Pin
Poul Haahr Klemmensen29-Apr-03 2:11
Poul Haahr Klemmensen29-Apr-03 2:11 
GeneralRe: Disappearing folders in Visual Studio Pin
Bartosz Bien29-Apr-03 2:36
Bartosz Bien29-Apr-03 2:36 
Generalfield evaluation in RTF files Pin
luedi28-Apr-03 23:12
luedi28-Apr-03 23:12 
GeneralRename project Pin
macmac3828-Apr-03 21:08
macmac3828-Apr-03 21:08 
GeneralRe: Rename project Pin
Rage28-Apr-03 21:19
professionalRage28-Apr-03 21:19 
GeneralRe: Rename project Pin
John R. Shaw29-Apr-03 15:11
John R. Shaw29-Apr-03 15:11 
GeneralChanging m_pszHelpFilePath Pin
JensB28-Apr-03 20:31
JensB28-Apr-03 20:31 
GeneralRe: Changing m_pszHelpFilePath Pin
Toni7828-Apr-03 21:18
Toni7828-Apr-03 21:18 
GeneralRe: Changing m_pszHelpFilePath Pin
JensB28-Apr-03 21:28
JensB28-Apr-03 21:28 
GeneralRe: Changing m_pszHelpFilePath Pin
Toni7828-Apr-03 21:48
Toni7828-Apr-03 21:48 
GeneralRe: Changing m_pszHelpFilePath Pin
JensB28-Apr-03 22:53
JensB28-Apr-03 22:53 

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.