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

Search:

Type: Posts; User: ttrz

Page 1 of 3 1 2 3

Search: Search took 0.01 seconds.

  1. Replies
    3
    Views
    891

    Re: Inheritance Problems

    In Runway::can_land(const Plane &current), you have the following:



    result = takeoff.append(current);


    takeoff is an object of type Extended_queue, which inherits append() from Queue....
  2. Replies
    1
    Views
    653

    Button Control with Layered Transparent PNGs

    Is it possible to use a combination of PNG images (with transparency) as the graphic for a button control?

    For example, let's say I have 3 PNG files: main.png, transparent1.png, and...
  3. Replies
    4
    Views
    632

    Re: documenting your code

    Okay, thanks. I wasn't sure if a feature like this was built into VS 2010. Based on the responses, it seems that it isn't I'll take a look at DOxygen thanks.
  4. Replies
    4
    Views
    632

    documenting your code

    hello,

    If I recall Java has a tool, I believe it's called Javadoc or something of that nature, that allows you to conveniently document your code. If I remember correctly, it generates HTML files...
  5. Thread: D3DXMatrixReflect

    by ttrz
    Replies
    0
    Views
    1,452

    D3DXMatrixReflect

    What is wrong with the following code?



    D3DXPLANE mirrorPlane(0.0f, 0.0f, 1.0f, 0.0f); // xy plane
    D3DXMATRIX R;
    D3DXMatrixReflect(&R, &mirrorPlane);


    When I run the program, it crashes...
  6. Replies
    0
    Views
    401

    Visual Studio 2010 Views

    When using the class view in VS 2010 Pro, it seems to show available classes but it does not let you browse the member variables/functions. Is there another view which does this? If so, I can't seem...
  7. Replies
    14
    Views
    1,194

    Re: Extracting a line from content in the line

    Yes, you are storing the input in a character array, and designating a maximum number of characters to read in getline(). If the input is larger than the maximum you have specified, you will run into...
  8. Replies
    14
    Views
    1,194

    Re: Extracting a line from content in the line

    Well, if you were going to do it the way I suggested, you wouldn't write to the output file until the user decided to quit.

    Right now you are getting input and then writing directly to the output...
  9. Replies
    14
    Views
    1,194

    Re: Extracting a line from content in the line

    Well, the easiest way is to probably have a separate string for first and last name:



    struct Person{
    string firstName,
    lastName,
    number,
    address;
    };
  10. Replies
    14
    Views
    1,194

    Re: Extracting a line from content in the line

    I'm not trying to write the program, I'm only providing ideas for certain parts. If you design it this way, you could add an element to the array/vector whenever you need to add someone to the...
  11. Replies
    14
    Views
    1,194

    Re: Extracting a line from content in the line

    In the above example, notice that if the user enters a word beginning with q (ie, quit) the program returns from main:



    case 'Q':
    cout << "Goodbye";
    return 0;


    As for the...
  12. Replies
    14
    Views
    1,194

    Re: Extracting a line from content in the line

    A vector is similar to an array, except that is grows dynamically. You don't need to know in advance exactly how many elements the vector will hold. Whenever you need to add an element to the vector,...
  13. Replies
    14
    Views
    1,194

    Re: Extracting a line from content in the line

    One possible option is to read the entire file into a vector of type Person, perform the needed operations, and then overwrite the file when the program is exiting. If your input file is huge, this...
  14. Thread: getline

    by ttrz
    Replies
    9
    Views
    891

    Re: getline

    Just looking at your snippet of code, I'm not sure why you are designing it this way. Each book has a title, author, publisher, etc.

    So why not design a book struct/class, and then create an array...
  15. Thread: getline

    by ttrz
    Replies
    9
    Views
    891

    Re: getline

    Post your code between CODE tags. It is not convenient for anyone to download files.
  16. Replies
    8
    Views
    719

    Re: Transition from C++ to Visual C++

    I'd also recommend reading and understanding Paul's response before deciding what you want to do. As usual, he is right on target.

    And hey, I have nothing against old time C programmers. ;)
  17. Replies
    8
    Views
    719

    Re: Transition from C++ to Visual C++

    I'm sure that many would argue that a GUI front-end does not have anything to do with the practical uses of a program. In any case, I think it depends on how low-level you want to go. If you are...
  18. Re: Need Help Regarding converting String to ASCII value

    #include <string>
    #include <iostream>

    using namespace std;

    int main () {
    string s = "Hello";

    cout << int(s[0]);
  19. Replies
    1
    Views
    338

    Re: Simple Counting Program

    Maybe there is a better way to do this, but this is just one way I thought of:



    #include <string>
    #include <fstream>
    #include <iostream>

    using namespace std;
  20. Re: PLEASE HELP! ATM simulation... Can't fix problem!

    Huh? It prints "What would you like today?" at the beginning of every iteration through the loop. If you don't want that, put it outside the loop.



    If you look at my code above, you will see...
  21. Re: PLEASE HELP! ATM simulation... Can't fix problem!

    It would probably be easier to use switch/case in this situation. How about something like this?



    #include <iostream>
    #include <string>
    #include <cctype>

    using namespace std;
  22. Thread: WM_PAINT logic

    by ttrz
    Replies
    3
    Views
    643

    Re: WM_PAINT logic

    Hello Paul. Thanks for your suggestion.

    I set the window size to 500 x 500 (the 6th and 7th arguments to CreateWindow).

    cyChar is 16.

    The first time though, the top and bottom of the...
  23. Thread: WM_PAINT logic

    by ttrz
    Replies
    3
    Views
    643

    WM_PAINT logic

    hi all,

    I'm still a bit new to things here, but I am trying to understand the logic behind the processing of the WM_PAINT message in this case. I have put my comments in below, trying to make...
  24. Thread: Printing patterns

    by ttrz
    Replies
    18
    Views
    1,127

    Re: Printing patterns

    Name your functions print_1_9, print_2_7, print_3_5, print_4_3, etc. Don't name them myFunction - that is just something I used when giving you an example.

    To keep it simple, implement the...
  25. Replies
    4
    Views
    2,489

    Re: Game programing in Borland C++ 5.02?

    Just to let you know, Visual Studio is free for students to try. Click here if you'd like to find out more.
Results 1 to 25 of 66
Page 1 of 3 1 2 3


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center