Click here to Skip to main content
15,888,351 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: is it technically right to refer programs written for MS-DOS as 16 bit [modified] Pin
Jayapal Chandran29-Oct-10 22:32
Jayapal Chandran29-Oct-10 22:32 
AnswerRe: is it technically right to refer programs written for MS-DOS as 16 bit Pin
Peter_in_278028-Oct-10 19:59
professionalPeter_in_278028-Oct-10 19:59 
GeneralRe: is it technically right to refer programs written for MS-DOS as 16 bit Pin
Jayapal Chandran29-Oct-10 22:39
Jayapal Chandran29-Oct-10 22:39 
AnswerRe: is it technically right to refer programs written for MS-DOS as 16 bit Pin
Eytukan28-Oct-10 21:24
Eytukan28-Oct-10 21:24 
GeneralRe: is it technically right to refer programs written for MS-DOS as 16 bit Pin
Jayapal Chandran29-Oct-10 22:38
Jayapal Chandran29-Oct-10 22:38 
AnswerRe: is it technically right to refer programs written for MS-DOS as 16 bit Pin
Aescleal28-Oct-10 23:41
Aescleal28-Oct-10 23:41 
GeneralRe: is it technically right to refer programs written for MS-DOS as 16 bit Pin
Jayapal Chandran29-Oct-10 22:38
Jayapal Chandran29-Oct-10 22:38 
Questionsizeof string array in for loop? Pin
ALLERSLIT28-Oct-10 4:40
ALLERSLIT28-Oct-10 4:40 
Hey, sorry if the threadtitle is a bit in-informative but I didn't know what to call it.
Ok now to my problem, I am playing around with arrays and stuff see here ->

#include <iostream>
#include <string>

using namespace std;

int main()
{
    string a[] = { "one", "two", "three" };
    
    for (int i = 0;i <3;i++)
    {
        cout << a[i] << endl;
    }
    cin.get();
}



Now my problem is the "i < 3" let's say I wouldn't want to change that everytime i add another string to my array.
How would I do that?

Greetings!
AnswerRe: sizeof string array in for loop? PinPopular
Chris Losinger28-Oct-10 4:56
professionalChris Losinger28-Oct-10 4:56 
GeneralRe: sizeof string array in for loop? Pin
ALLERSLIT28-Oct-10 5:23
ALLERSLIT28-Oct-10 5:23 
AnswerRe: sizeof string array in for loop? Pin
Sauro Viti28-Oct-10 5:23
professionalSauro Viti28-Oct-10 5:23 
GeneralRe: sizeof string array in for loop? Pin
ALLERSLIT28-Oct-10 5:29
ALLERSLIT28-Oct-10 5:29 
GeneralRe: sizeof string array in for loop? Pin
Sauro Viti28-Oct-10 6:08
professionalSauro Viti28-Oct-10 6:08 
AnswerRe: sizeof string array in for loop? Pin
Aescleal28-Oct-10 23:29
Aescleal28-Oct-10 23:29 
QuestionProblem with ScrollBar(MFC VC6) Pin
ashtwin28-Oct-10 1:50
ashtwin28-Oct-10 1:50 
AnswerRe: Problem with ScrollBar(MFC VC6) Pin
Richard MacCutchan28-Oct-10 2:58
mveRichard MacCutchan28-Oct-10 2:58 
GeneralRe: Problem with ScrollBar(MFC VC6) Pin
ashtwin28-Oct-10 21:23
ashtwin28-Oct-10 21:23 
GeneralRe: Problem with ScrollBar(MFC VC6) Pin
Richard MacCutchan28-Oct-10 23:05
mveRichard MacCutchan28-Oct-10 23:05 
QuestionEncoderParameter in GDIPLUS Pin
002comp28-Oct-10 0:40
002comp28-Oct-10 0:40 
QuestionUse of Non-Unicode DLL in Unicode project Pin
chevu27-Oct-10 21:45
chevu27-Oct-10 21:45 
AnswerRe: Use of Non-Unicode DLL in Unicode project [modified] Pin
Aescleal27-Oct-10 22:07
Aescleal27-Oct-10 22:07 
AnswerRe: Use of Non-Unicode DLL in Unicode project Pin
Alain Rist27-Oct-10 22:41
Alain Rist27-Oct-10 22:41 
QuestionWindows 7 VS 2008 fatal error LNK1168: cannot open file.exe for writing Pin
transoft27-Oct-10 17:16
transoft27-Oct-10 17:16 
AnswerRe: Windows 7 VS 2008 fatal error LNK1168: cannot open file.exe for writing Pin
Luc Pattyn27-Oct-10 17:21
sitebuilderLuc Pattyn27-Oct-10 17:21 
GeneralRe: Windows 7 VS 2008 fatal error LNK1168: cannot open file.exe for writing Pin
transoft27-Oct-10 17:28
transoft27-Oct-10 17: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.