Search:

Type: Posts; User: Cris987

Page 1 of 3 1 2 3

Search: Search took 0.01 seconds.

  1. Replies
    2
    Views
    1,340

    ahh, okay, thx.

    ahh, okay, thx.
  2. Replies
    2
    Views
    1,340

    Passing Class Array through Fucntion

    I made a class called Box, which has a size of 100 . Then I made an array of 6 "Boxes" , now, the size if 600. However, when I pass this array into a function, and tries to use sizeof in the...
  3. Replies
    2
    Views
    1,275

    Need help....AGAIN

    I think it's a simple syntax error, but I can't seem to fix it.


    #include <iostream>
    using namespace std;

    class Town
    {
    public:
    Town(string Name): name(Name) {} ...
  4. Replies
    10
    Views
    2,713

    OMFG....thx alot

    OMFG....thx alot
  5. Replies
    10
    Views
    2,713

    Okya, I 'm gonna post up the actual code that...

    Okya, I 'm gonna post up the actual code that makes the error



    //TOWN.H
    #ifndef TOWN_H
    #define TOWN_H
    #include <string>
    #include <iostream>
    using namespace std;
  6. Replies
    10
    Views
    2,713

    Umm....tried it. Stilll doesn't work (same error)...

    Umm....tried it. Stilll doesn't work (same error) :(
  7. Replies
    10
    Views
    2,713

    well, ya....sry, but that wasn't the problem (i...

    well, ya....sry, but that wasn't the problem (i just typed it wrong)
  8. Replies
    10
    Views
    2,713

    "return function" doesn't work

    here's my simplified codes:


    class Drug
    {
    public:
    Drug(): avai(0) {};
    bool& get_avai()
    {
    ...
  9. Replies
    8
    Views
    1,182

    I got wat u guys were saying. Thx! :D

    I got wat u guys were saying. Thx! :D
  10. Replies
    8
    Views
    1,182

    okay, i think i understand now. But here's one...

    okay, i think i understand now. But here's one more question: when returning the value of a variable in a class using a function, which one below is better?


    int returnsomething(int member)
    {
    ...
  11. Replies
    8
    Views
    1,182

    Would you mind giving me a small example on...

    Would you mind giving me a small example on "functions that return variables you don't want changed"? :rolleyes:
  12. Replies
    8
    Views
    1,182

    Protected and Public

    I'm getting confused with the two. When should I use protected and when should I not? My book says almost all the variables in a class should be protected, yet I found that really cumbersome when...
  13. Replies
    11
    Views
    1,497

    thx alot, i fixed everything! :D

    thx alot, i fixed everything! :D
  14. Replies
    11
    Views
    1,497

    umm...anyone out there? :rolleyes:

    umm...anyone out there? :rolleyes:
  15. Replies
    11
    Views
    1,497

    i did wat u told me, but the following errors...

    i did wat u told me, but the following errors still occur


    -town.cpp In constructor `Town::Town()':
    -line 14 town.cpp no matching function for call to `Drug::Drug()'
    -line 8 town.h candidates...
  16. Replies
    11
    Views
    1,497

    kk, didn't have time in the morning, so didn't...

    kk, didn't have time in the morning, so didn't read thoroughly ><
    I use Dev C++, Windows XP . And here are the codes and errors:



    //town.h
    #ifndef TOWN_H
    #define TOWN_H
    #include <string>...
  17. Replies
    11
    Views
    1,497

    well, I was on gamedev the other day, and saw a...

    well, I was on gamedev the other day, and saw a person get blast at for posting half a page of codes. He was advised to post up a zip file instead. so - ya. anyways, here's the code that has the...
  18. Replies
    11
    Views
    1,497

    All the errors r in the file town.cpp . The...

    All the errors r in the file town.cpp .
    The errors:


    - In construtor Town::Town()
    - no matching function to call Drug::Drug()
    -candidates are: Drug:Drug(const Drug&)
    ...
  19. Replies
    11
    Views
    1,497

    Really need help....

    I 'm trying to write an ASCII clone of DopeWars, but had just gotten a bit of a break through, when I found out there's a whole bunch of errors when compiling. Would somoene(s) please tell me wat i...
  20. Thread: Searching

    by Cris987
    Replies
    8
    Views
    1,310

    Well, at least he/she is better than MY teacher....

    Well, at least he/she is better than MY teacher. Who goes: "Sup gurls, need some help? " (and simply type up the whole program for the gurls) ; and " HEY, YOU GUYS, wat r u doing on the internet?...
  21. Replies
    11
    Views
    3,563

    Okay, first of all, there's a few problems with...

    Okay, first of all, there's a few problems with your code:

    1. prototypes should have ';' at the end
    2. it's cout << 1 << 2 << 3 << 4 not cout << 4 << 3 << 2 << 1

    The code works perfectly fine...
  22. Replies
    1
    Views
    1,454

    Anyone read this book?

    I found this book online at my local library: Windows programming with C++ Henning Hansen. Has anyone read it? Is it any good?
  23. Replies
    7
    Views
    2,413

    wups ! that's true. But the same errors is still...

    wups ! that's true. But the same errors is still there....
  24. Replies
    7
    Views
    2,413

    Do you mean that I need the ';' for my...

    Do you mean that I need the ';' for my constructors and destructors? I tried that, but nothing changed.
  25. Replies
    7
    Views
    2,413

    Simple class doesn't work

    -------------------------------------------------------------------------------
    //integer.h

    #ifndef INTEGER_H

    #define INTEGER_H
    #include <iostream>
    class Integer
    {
    private:
Results 1 to 25 of 66
Page 1 of 3 1 2 3