Click here to Skip to main content
15,912,205 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionCTreeCtrl selection problem Pin
RoyceF26-Apr-06 5:57
RoyceF26-Apr-06 5:57 
AnswerRe: CTreeCtrl selection problem Pin
includeh1026-Apr-06 6:16
includeh1026-Apr-06 6:16 
GeneralRe: CTreeCtrl selection problem Pin
RoyceF26-Apr-06 7:15
RoyceF26-Apr-06 7:15 
GeneralRe: CTreeCtrl selection problem Pin
RoyceF26-Apr-06 7:17
RoyceF26-Apr-06 7:17 
QuestionCFileDialog & GetOpenFileName Pin
RobJones26-Apr-06 5:24
RobJones26-Apr-06 5:24 
QuestionRe: CFileDialog & GetOpenFileName Pin
David Crow26-Apr-06 6:06
David Crow26-Apr-06 6:06 
AnswerRe: CFileDialog & GetOpenFileName Pin
RobJones26-Apr-06 6:18
RobJones26-Apr-06 6:18 
AnswerRe: CFileDialog & GetOpenFileName Pin
RobJones26-Apr-06 6:42
RobJones26-Apr-06 6:42 
AnswerRe: CFileDialog & GetOpenFileName Pin
RobJones26-Apr-06 7:16
RobJones26-Apr-06 7:16 
AnswerRe: CFileDialog & GetOpenFileName Pin
RobJones26-Apr-06 7:58
RobJones26-Apr-06 7:58 
QuestionRe: CFileDialog & GetOpenFileName Pin
David Crow27-Apr-06 2:45
David Crow27-Apr-06 2:45 
GeneralRe: CFileDialog & GetOpenFileName Pin
David Crow27-Apr-06 9:41
David Crow27-Apr-06 9:41 
GeneralRe: CFileDialog & GetOpenFileName Pin
RobJones27-Apr-06 9:50
RobJones27-Apr-06 9:50 
GeneralRe: CFileDialog & GetOpenFileName Pin
RobJones1-May-06 3:55
RobJones1-May-06 3:55 
QuestionSystem sound volume on WinCE Pin
KellyR26-Apr-06 5:15
KellyR26-Apr-06 5:15 
QuestionJPEG image display Pin
CPP91126-Apr-06 4:52
CPP91126-Apr-06 4:52 
AnswerRe: JPEG image display Pin
Russell'26-Apr-06 5:08
Russell'26-Apr-06 5:08 
AnswerRe: JPEG image display Pin
KellyR26-Apr-06 5:12
KellyR26-Apr-06 5:12 
AnswerRe: JPEG image display Pin
Hamid_RT26-Apr-06 18:46
Hamid_RT26-Apr-06 18:46 
QuestionYour comments for Font-Editor Pin
includeh1026-Apr-06 4:47
includeh1026-Apr-06 4:47 
Questiondraw a thin line with anti-aliasing as Font! Pin
includeh1026-Apr-06 4:43
includeh1026-Apr-06 4:43 
AnswerRe: draw a thin line with anti-aliasing as Font! Pin
Shog926-Apr-06 17:53
sitebuilderShog926-Apr-06 17:53 
Questionarray Pin
#hackC++26-Apr-06 4:42
#hackC++26-Apr-06 4:42 
This is the array program I made last night.


/* A stupid array program that I made when I was bored one night */<br />
<br />
#include iostream  <br />
using namespace std;<br />
<br />
int main()<br />
{<br />
    const size_t arsize = 27;<br />
    int a[arsize] = {0,1,2,3,4,5,6,7,8,9,10,<br />
                     11,12,13,14,15,16,17,18,<br />
                     19,20,21,22,23,24,25,26,};<br />
                       <br />
    a[0] = 'a';  a[1] = 'b';<br />
    a[2] = 'c';  a[3] = 'd';<br />
    a[4] = 'e';  a[5] = 'f';<br />
    a[6] = 'g';  a[7] = 'h';<br />
    a[8] = 'i';  a[9] = 'j';<br />
    a[10] = 'k'; a[11] = 'l';<br />
    a[12] = 'm'; a[13] = 'n';<br />
    a[14] = 'o'; a[15] = 'p';<br />
    a[16] = 'q'; a[17] = 'r';<br />
    a[18] = 's'; a[19] = 't'; <br />
    a[20] = 'u'; a[21] = 'v';<br />
    a[22] = 'w'; a[23] = 'x';<br />
    a[24] = 'y'; a[25] = 'z';<br />
    a[26] = ' ';<br />
<br />
    int input; <br />
    string cool;<br />
    int end = 99;<br />
    <br />
    cout << "Programmed By Cody Rentschler\n" << endl;    <br />
    cout << "Alphabit Array testing." << endl;<br />
    cout << "Numbers 0 - 26 only." << endl;<br />
    cout << "Input 99 to exit out of loop." << endl;<br />
    <br />
    for (int can = 0; can != 1000000; cool.push_back(a[input]))<br />
        {<br />
             cin >> input;<br />
             cin.ignore(100,'\n');<br />
             if (input == end)    // To get out of for loop<br />
             {<br />
                       break;<br />
             }<br />
             <br />
             if (input > 26)<br />
             {<br />
                       cout << "Error: Number to big" << endl;<br />
                       cin.get();<br />
                       system("cls");<br />
                       return main();<br />
             }<br />
             <br />
             if (input < 0)<br />
             {<br />
                       cout << "Error: Number to small" << endl;<br />
                       cin.get();<br />
                       system("cls");<br />
                       return main();<br />
             }<br />
             ++can;<br />
             <br />
        }<br />
        <br />
        cout << "\n\n\n\n" << endl;<br />
        cout << cool << endl;<br />
        cin.get();<br />
  <br />
    <br />
    return 0;<br />
} 


Is this and example of how an array works or am I
using this function wrong.

Just wondering because i'm trying to figure out how arrays work.

Or is there an easier way to do this same program?
AnswerRe: array Pin
Russell'26-Apr-06 5:02
Russell'26-Apr-06 5:02 
QuestionRe: array Pin
David Crow26-Apr-06 5:52
David Crow26-Apr-06 5:52 

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.