CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: kahjun

Search: Search took 0.02 seconds.

  1. Replies
    1
    Views
    2,755

    Displaying integer

    int i = 0;
    cout<< i;


    i want to display i as in 000
    if my int i = 1, i want it to display 001.

    how do i code it so that it works like that?
  2. Replies
    6
    Views
    4,508

    Re: reading from file using a function problem

    thanks alot monarch, you've been a great help =)

    i've managed to read the whole file and print it out using
    cout<<lines; now, but i still have a question.

    Assuming my files have the words...
  3. Replies
    6
    Views
    4,508

    Re: reading from file using a function problem

    thanks for reply monarch, the .stx is the extension of the file that i'm supposed to open...
    i've included the .c_str() but still couldn't get it working :'(
  4. Replies
    6
    Views
    4,508

    reading from file using a function problem

    void Lines::load(string filename)
    {
    string lines;

    ifstream inFile;
    inFile.open(filename.stx);
    if (!inFile)
    {
    cout<<"error";
    }
  5. Replies
    5
    Views
    5,297

    string not included error

    #ifndef LINES_H_INCLUDED
    #define LINES_H_INCLUDED
    #include <string>


    /** @file Lines.h */

    typedef string ListItemType;
    /** class Lines*/
  6. Replies
    3
    Views
    487

    Re: for loop not working as i wished

    sry for not being specific...


    "a" is actually a vector of strings and "b" is a variable used to store another string that i key in

    string getName() {
    return name;
    }

    template <typename A...
  7. Replies
    3
    Views
    487

    for loop not working as i wished

    i'm currently a student learning programming and i have a part of the for loop where i couldn't get the output as i wanted = (



    a[0] = aaa
    a[1] = bbb
    I'm actually iterating through a vector...
Results 1 to 7 of 7





Click Here to Expand Forum to Full Width

Featured