Search:

Type: Posts; User: arnis

Search: Search took 0.01 seconds.

  1. Replies
    2
    Views
    2,174

    Round off to nearest .50

    In my book it said that i can use this

    cout.setf(ios::fixed, ios::floatfield);
    cout.precision(2);

    But what if i want to round it off to the nearest 0.50?

    like double Cash = 10.34 will be...
  2. Thread: hmm help-

    by arnis
    Replies
    5
    Views
    1,347

    Yes that's the only include i have. If i comment...

    Yes that's the only include i have.
    If i comment out the enum bool part. I get one less error.

    It's not a windows project so its very strange.
    Maybe windows.h is included automatic in the...
  3. Thread: C++ Help

    by arnis
    Replies
    5
    Views
    1,610

    Maybe this can be for some help?. #include...

    Maybe this can be for some help?.


    #include <iostream>

    float Convert(float);

    int main()
    {
    float TempFer;
  4. Thread: hmm help-

    by arnis
    Replies
    5
    Views
    1,347

    hmm help-

    Ok im having trouble compiling this. Its exactly what the book has written. I know that this book is out of standard (teach yourself c++ in 21 days).



    #include <iostream>

    typedef...
  5. Replies
    8
    Views
    1,754

    thanks. Im going to bed now. will test it...

    thanks. Im going to bed now. will test it tommorow:)
  6. Replies
    8
    Views
    1,754

    haha. My mistake. Ive corrected that. But i still...

    haha. My mistake. Ive corrected that. But i still get this random numbers.
  7. Replies
    8
    Views
    1,754

    OK. new easy question for you guys.

    #include <iostream>
    #include <stdlib.h>

    class Employee//Class called employee
    {
    int Age;
    int YearsOfService;
    int Salary;
    public:
    Employee(): Age(18) ,YearsOfService(1) ,Salary(10000){} //...
  8. oh thanks. thats good to know

    oh thanks. thats good to know
  9. Thanks for all the replies. I will analyze this...

    Thanks for all the replies. I will analyze this carefully now.

    " CornedBee: Why does the function return a float anyway?"

    I just thought that would be the best way. Because this numbers usualy...
  10. Ok. I tried some more. This is what i got. ...

    Ok. I tried some more. This is what i got.



    #include <iostream>
    #include <stdlib.h>
    float sum;
    int count = 1;
    float myFunc(unsigned short int x, unsigned short int y);
    int main()
  11. Ok. sorry to bother you guys with a newb question.

    Ok ive just started learning c++. Acctualy i tried to start for like a year ago but I didnt have enough time to learn it.
    Anyway. here is my problem.

    "Write a program that asks for a number and a...
  12. Replies
    9
    Views
    1,040

    Ok im a newbie..

    .. But its seams to me that you used char instead of int

    Char is only characters..
    try int a; instead of char a;
    im not sure about the math signs though.

    Again. Im a newbie ,and your...
  13. Thread: Books?

    by arnis
    Replies
    9
    Views
    2,020

    Basic

    Im thinking of learning the basics. and then move on to the advanced stuff.

    And thanks for replying..
    Any other suggestions??
  14. Thread: Books?

    by arnis
    Replies
    9
    Views
    2,020

    Books?

    Hello. I'm a C++ newbie. And i'm going to buy a book.
    I was just wondering, what book should i get?

    Thanks.
  15. Replies
    7
    Views
    2,389

    IRC help channel?

    U guys know about any IRC help channel for c++ programmers?
  16. Replies
    4
    Views
    898

    Thanks... When u say threads do u mean like...

    Thanks...

    When u say threads do u mean like this?

    loop (indeed)
    {
    function();
    {
    anotherFunction();
    }
  17. Replies
    4
    Views
    898

    Another newbie question

    Is there a way to make a function run "in the background" ?

    like this:

    myFunction(); //this will run til the app closes..
    AnotherFuntion(); //while myFucntion is still running..

    Hope you...
  18. Replies
    1
    Views
    799

    Another Newbie question

    What does the '%' do??
    I cant figure out what it does!
  19. Thread: Need some tips.

    by arnis
    Replies
    3
    Views
    1,454

    Ok. thanks

    Im working on that in this very moment.
    Im making this Crappy Textbased RPG game..


    But thanks for the help
  20. Thread: newbie Question

    by arnis
    Replies
    2
    Views
    972

    thanks

    Thanks alot m8
  21. Thread: If statement's

    by arnis
    Replies
    10
    Views
    1,281

    remove the { }

    Thats the problem in your code..

    { //Should not be there
    if(input==1)
    cout<<"Play on";
    else if(input==2)
    cout<<"Your game is loading";
    else if(input==3)
    cout<<"Play...
  22. Thread: If statement's

    by arnis
    Replies
    10
    Views
    1,281

    Strange.

    #include <iostream.h>

    int main()
    {
    int input;
    cout<<"1. play game: ";//mabey no two dot's?
    cout<<"2. Load game: ";
    cout<<"3. play multiplayer: ";
    cout<<"4. Exit: ";
    cin>>input;
  23. Thread: If statement's

    by arnis
    Replies
    10
    Views
    1,281

    aaah

    Try to use: else if

    Im a newb too. But I think it will work..
    Tell me if it works=)


    if(input==1)
    cout<<"Play on";
    else if(input==2)
    cout<<"Your game is loading";
  24. Thread: newbie Question

    by arnis
    Replies
    2
    Views
    972

    newbie Question

    How can I print the text like its typed?

    Its kinda hard to explain.. (because of my bad english skills)


    A
    AR
    ARN
    ARNIS
  25. Thread: Need some tips.

    by arnis
    Replies
    3
    Views
    1,454

    Need some tips.

    I've just started with C++ and im interested in learning Game programming in windows.

    I've read that this book is good for beginners:
    'Tricks of the Windows Game Programming Gurus'

    Is this a...
Results 1 to 25 of 25