Search:

Type: Posts; User: GaPe

Page 1 of 20 1 2 3 4

Search: Search took 0.01 seconds.

  1. Thread: const method

    by GaPe
    Replies
    3
    Views
    1,012

    const method

    Hi!

    When do I need to declare const method? And when to use const references?

    Some pseudo-code examples will be just fine.

    Thanks!
  2. Replies
    6
    Views
    1,527

    Delay for ms - CPU Usage

    Hi!

    If I delay my program for certain amount of milliseconds, how much CPU is used?
  3. Thread: Group Of Methods

    by GaPe
    Replies
    3
    Views
    867

    Yes, something like that. But, is that good...

    Yes, something like that. But, is that good programming?
  4. Thread: Group Of Methods

    by GaPe
    Replies
    3
    Views
    867

    Group Of Methods

    Hi!

    Anyone knows how can you make a group of methods in a .hpp file in C++?

    And when you use this header file it looks like this ...



    Support s;
  5. Replies
    4
    Views
    1,068

    Thanks for the replies! "The array contains 3...

    Thanks for the replies!

    "The array contains 3 Activity pointers ..."
    That's what I meant. So that's cool.



    for (int i = 0; i < tableLength - 1; i++)
    {
    Activity *act =...
  6. Replies
    4
    Views
    1,068

    Class and pointer to pointer

    Hi!

    I have a few questions about ** (pointer to pointer).

    Let's say I have a class named Activity.

    I would code it like this ...


    int tableLength = 3; // 2 from before and 1 new
  7. Replies
    10
    Views
    1,678

    Ok this works! Thanks. But what about...

    Ok this works! Thanks.

    But what about overloading this =>

    int cal = 200;
    char *text = "Result is " + calc;

    How can I overload this?
  8. Replies
    10
    Views
    1,678

    I don't want to use templates. I want to overload.

    I don't want to use templates. I want to overload.
  9. Replies
    10
    Views
    1,678

    All I want to do is this => int cal = 200...

    All I want to do is this =>


    int cal = 200
    String s = "Result is " + calc;


    And this code must produce a string which looks like this=> s = "Result is 200". I want to create java-like String...
  10. Replies
    10
    Views
    1,678

    String + int (overloading)

    Hi!

    I want to overload operator +, so I can write strings in this way => String s = "Age: " + 20; // int, long and double

    How am I supposed to do that?
  11. Thread: deleting variable

    by GaPe
    Replies
    8
    Views
    1,165

    What does this mean "void *&mem"? What's the...

    What does this mean "void *&mem"? What's the trick?
  12. Replies
    1
    Views
    905

    const on functions

    Hi!

    I know the meaning of the const in the parameter field but I don't know exactly what it means if you declared it after the parameter field.



    bool find(const String &str) const; // what...
  13. Thread: deleting variable

    by GaPe
    Replies
    8
    Views
    1,165

    Thanks for the reply. Can you give me an...

    Thanks for the reply.

    Can you give me an example for using UNICODE?
  14. Thread: deleting variable

    by GaPe
    Replies
    8
    Views
    1,165

    deleting variable

    Hi!

    I'm a little confused about deleting a variable in this case:

    file String.hpp ...


    ...
    class String {
    public:
  15. Replies
    9
    Views
    1,181

    Thanks! It's working now.

    Thanks! It's working now.
  16. Replies
    9
    Views
    1,181

    How do I do that?

    How do I do that?
  17. Replies
    9
    Views
    1,181

    Overloading operator += => String and char

    Hi!

    I have another overloading operator problem.

    I want to use my String class with type char.

    Example:
    String temp = "";
    char z = 'a';
    temp += z;
  18. Thank you very much!

    Thank you very much!
  19. str[0] = 'a' => how to make it work (overloading operators)

    Hi!

    I have a problem with overloading a [] operator. Whenever I want to assign value to a string I always get this message "error C2106: '=' : left operand must be l-value".

    Example:
    str[1] =...
  20. Replies
    8
    Views
    8,747

    initialization of double pointer with new

    Hi!

    Can anyone, please, write me an example of initialization of double pointer with new?

    char **tableOfStrings = new ...???

    Thanks!
  21. Thread: Overloading

    by GaPe
    Replies
    15
    Views
    1,811

    How am I supposed to define that friend method in...

    How am I supposed to define that friend method in .cpp file?
  22. Thread: Overloading

    by GaPe
    Replies
    15
    Views
    1,811

    I already have this method "operator const char...

    I already have this method "operator const char *() { return text; }" and it is not working. I still get the address instead of the actual text.

    Any other suggestions?


    I like pie...
  23. Thread: Overloading

    by GaPe
    Replies
    15
    Views
    1,811

    Overloading

    Hi!

    I have a class named String which contains member "char *text" and method "void print() const;".

    Whenever i declare String class and i want to print that string on the screen i...
  24. Replies
    4
    Views
    2,236

    Yes, I know how to use resources. Thanks!

    Yes, I know how to use resources. Thanks!
  25. Replies
    4
    Views
    2,236

    LoadImage works for the icon, which is inside the...

    LoadImage works for the icon, which is inside the program. But I really need to use the resources if I want to have an iconic exe file.

    Thank you for your help.
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4