Click here to Skip to main content
15,916,692 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How do I use a string as a parameter in a Win32 api function? Pin
Zac Howland18-Sep-06 10:52
Zac Howland18-Sep-06 10:52 
GeneralRe: How do I use a string as a parameter in a Win32 api function? Pin
BarryOg18-Sep-06 11:17
BarryOg18-Sep-06 11:17 
GeneralRe: How do I use a string as a parameter in a Win32 api function? Pin
PJ Arends18-Sep-06 17:44
professionalPJ Arends18-Sep-06 17:44 
QuestionI am looking for DataGrid Pin
NorGUI18-Sep-06 9:31
NorGUI18-Sep-06 9:31 
QuestionQuick C++ Questions Pin
BlitzPackage18-Sep-06 9:08
BlitzPackage18-Sep-06 9:08 
AnswerRe: Quick C++ Questions Pin
led mike18-Sep-06 9:48
led mike18-Sep-06 9:48 
GeneralRe: Quick C++ Questions Pin
BlitzPackage18-Sep-06 10:35
BlitzPackage18-Sep-06 10:35 
AnswerRe: Quick C++ Questions Pin
Zac Howland18-Sep-06 10:15
Zac Howland18-Sep-06 10:15 
BlitzPackage wrote:
The standard template library vector (i.e. vector myVector) - can you double subscript it (i.e. myVector[2][3])?


Yes. You just declare it this way:

vector< vector<int> > myVector;


This creates a 2 dimensional array of integers.

BlitzPackage wrote:
Do vectors (again from the STL) inherently allocate dynamic memory (the more abundant kind)? In other words, if I use the pushback() method, is the vector allocating that memory dynamically on the heap (or free-store)?


The memory that vector/list/deque/heap/stack/map/set/etc use is on the heap. It allocates and manages it so that you don't have to. Almost all of the STL containers allocate a default size (or a grow-by depending on the type of container) to optimize allocations. They also typically do not resize smaller (so resizing a vector to a smaller size will not free up any memory).


If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week

Zac

GeneralRe: Quick C++ Questions Pin
BlitzPackage18-Sep-06 10:34
BlitzPackage18-Sep-06 10:34 
GeneralRe: Quick C++ Questions Pin
led mike18-Sep-06 10:39
led mike18-Sep-06 10:39 
GeneralRe: Quick C++ Questions Pin
Zac Howland18-Sep-06 10:45
Zac Howland18-Sep-06 10:45 
GeneralRe: Quick C++ Questions Pin
led mike18-Sep-06 12:16
led mike18-Sep-06 12:16 
GeneralRe: Quick C++ Questions Pin
BlitzPackage18-Sep-06 16:26
BlitzPackage18-Sep-06 16:26 
QuestionWorking with a Owner Draw Fixed listbox Pin
skullfire18-Sep-06 8:42
skullfire18-Sep-06 8:42 
AnswerRe: Working with a Owner Draw Fixed listbox Pin
Mohammad A Gdeisat18-Sep-06 9:08
Mohammad A Gdeisat18-Sep-06 9:08 
AnswerRe: Working with a Owner Draw Fixed listbox Pin
Mohammad A Gdeisat18-Sep-06 9:17
Mohammad A Gdeisat18-Sep-06 9:17 
GeneralRe: Working with a Owner Draw Fixed listbox Pin
skullfire18-Sep-06 9:42
skullfire18-Sep-06 9:42 
Question[Message Deleted] Pin
Sam 200618-Sep-06 8:02
Sam 200618-Sep-06 8:02 
AnswerRe: [URGENT] dialog.DoModal(); Pin
Zac Howland18-Sep-06 8:05
Zac Howland18-Sep-06 8:05 
AnswerRe: [URGENT] dialog.DoModal(); Pin
toxcct18-Sep-06 8:07
toxcct18-Sep-06 8:07 
QuestionRe: [Message Deleted] Pin
Hamid_RT18-Sep-06 19:41
Hamid_RT18-Sep-06 19:41 
Questionpassword Protection in vc++ Pin
amaneet18-Sep-06 7:52
amaneet18-Sep-06 7:52 
AnswerRe: password Protection in vc++ Pin
led mike18-Sep-06 8:11
led mike18-Sep-06 8:11 
Questionhiding menu items Pin
Mohammad A Gdeisat18-Sep-06 7:17
Mohammad A Gdeisat18-Sep-06 7:17 
AnswerRe: hiding menu items Pin
Christopher Duncan19-Sep-06 1:04
Christopher Duncan19-Sep-06 1:04 

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.