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

Search:

Type: Posts; User: GCDEF

Page 1 of 80 1 2 3 4

Search: Search took 0.22 seconds.

  1. Replies
    7
    Views
    227

    Re: Savings Calculator Help!

    You have two different tests for the principal amount. The first time you're testing < 1 and the second < 100. You should be consistent there.

    When testing for years, you're using >= 20 but...
  2. Replies
    7
    Views
    202

    Re: std::vector with negative subscript?

    If the boundaries of your range are known, such as -10,000 - 10,000, you could use a 20,000 element vector and just add 10,000 to your index.
  3. Replies
    7
    Views
    227

    Re: Savings Calculator Help!

    Your code doesn't compile for me, but issues I see,

    Variables used to control loops should be integral types. Don't use floating point in loops

    The variable "year" in your for loop is...
  4. Replies
    7
    Views
    240

    Re: printer spool app

    This is a Visual C++ forum, not Visual Basic. As far as I know, you'd need to write your own printer driver, and if you're not an experienced programmer, it's not something you'd be able to do.
  5. Re: "No Such File Or Directory" Error For Header File (C++ Primer)

    I can't tell what you're trying to do in the first error.

    In the rest, you need to initialize class members in a constructor. You can't initialize them when you define them like that.
  6. Re: Is memory allocated to a variable name or an address?

    Are you asking me or telling me? Uninitialized, it will never get a specific address from memory. It will contain whatever happened to be in the computer's memory where its value is stored. It may...
  7. Re: Is memory allocated to a variable name or an address?

    Look at it step by step


    #include"stdio.h"
    main()
    {
    char *A,*B;
    A=B; B wasn't initialized, so A and B now both point to some random and meaningless number
    A=new char[10]; new returns a...
  8. Re: Is memory allocated to a variable name or an address?

    Since this is probably homework, why don't you analyze is a line at a time and understand what's going on. There is a problem there, but it's crucial that you understand what and why. Tell us what...
  9. Replies
    2
    Views
    195

    Re: Hide Child Window after EndPaint(&ps)

    You could UpdateWindow() then hide the child.
  10. Re: How to return the integer value of a string?

    Are you asking about a string representation of a binary number as in "011101010", or a decimal number such as "1234"?
  11. Re: Calling functions with strings in main is driving me insane

    From post number 3, it looks like the teacher wants him to redo it using strings and resubmit it.
  12. Re: Calling functions with strings in main is driving me insane

    The example I provided showed you calling getNumSales with one argument and storing the result. Your code does something completely different. You got lucky 2kaud did your assignment for you. ...
  13. Re: Calling functions with strings in main is driving me insane

    Based on the way you've described the program, I don't see the need for strings anywhere unless you just want to store the name in a variable as in
    string jacobsName = "Jacob";

    Then you could...
  14. Re: Placing a CFormView object within a child window.

    Why nest a CFormView in a CView. Just use a CFormView and place the controls on the right and do your plotting on the left side.
  15. Replies
    3
    Views
    322

    Re: make container of exe's using tabs

    I could be wrong, I don't think that's possible. OLE can let you embed apps, but they have to be designed to allow it.
  16. Replies
    6
    Views
    414

    Re: Rock/Paper/Scissors

    Why did you move srand back into a loop? Only call it once at the beginning of your program.
  17. Replies
    6
    Views
    332

    Re: Stuck on "else if" exercise

    Happy to help.
  18. Replies
    6
    Views
    332

    Re: Stuck on "else if" exercise

    You're outputting the total before you calculate it, but you have other issues as I've already pointed out.
  19. Replies
    6
    Views
    332

    Re: Stuck on "else if" exercise

    Which if those conditions will get executed if the weight is exactly 2.0, 4.0 or 6.0?

    A more typical structure would be

    if(pound < 2.0)
    {
    ...
    }
    else if(pound < 4.0)
    {
  20. Re: Upon checking the emptiness of an array, I'm getting an unexpected result

    Not really enough to go on there. Does the if(pool.empty()) code get executed too?

    What does the debugger show you?
  21. Replies
    11
    Views
    674

    Re: #define not working with my input

    What was it?
  22. Replies
    11
    Views
    674

    Re: #define not working with my input

    Possibly that compiler has something else already defined as PI. Try calling it something else. The exact error message would help.
  23. Replies
    11
    Views
    674

    Re: #define not working with my input

    Once I changed the >> to << it compiled cleanly for me using VS 2012.
  24. Replies
    11
    Views
    674

    Re: #define not working with my input

    Your #define is working fine. You have a little issue here though

    cout << "The area of a circle is" <<PI>> "* radius * radius"<<endl;
  25. Re: Operator overloading and mysterious object dereferencing?

    Your debugger should show you everything that's going on. Did you try it?
Results 1 to 25 of 2000
Page 1 of 80 1 2 3 4


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




HTML5 Development Center