Search:

Type: Posts; User: Walle

Search: Search took 0.00 seconds.

  1. Thread: file directory.

    by Walle
    Replies
    5
    Views
    1,781

    i.e. instead of "filename", have the user enter...

    i.e. instead of "filename", have the user enter "c:/directory/filename"
  2. Replies
    7
    Views
    2,406

    Basicly, when you got "&say[0]=Hello", that's...

    Basicly, when you got "&say[0]=Hello", that's because you gave cout the address for the character 'H', and it just kept printing them all until it stumbled upon a null-termination (which is no...
  3. Replies
    1
    Views
    1,401

    They are conditional expressions. If the...

    They are conditional expressions. If the expression before the ? is true, then the value between the ? and : is assigned, if the expression is false, then the value after the : is assigned.


    if...
  4. Thread: just a question

    by Walle
    Replies
    6
    Views
    1,331

    Phaeren: Are you looking for a way to "magically"...

    Phaeren: Are you looking for a way to "magically" open, load and display a text file? I.e. you want to do "opentextfile("filename.txt"); and have that open the file in a text window?

    For that to...
  5. Replies
    12
    Views
    1,674

    True and false can also be thought as 1 (for...

    True and false can also be thought as 1 (for true) and 0 for false.

    The basic boolean operators are AND (&&), OR (||), NOT (!). Consider the following truth-tables:
    (C is the result of the...
  6. Replies
    5
    Views
    1,519

    Since the CR and LF are ASCII-symbols (Carriage...

    Since the CR and LF are ASCII-symbols (Carriage Return and Line Feed, number 13 and 10 in the ASCII-table), you'd just have to modify your program to handle those characters as well. Or, write a...
  7. That is irony. I have been reading that FAQ...

    That is irony. I have been reading that FAQ thoroughly the last few days, I just haven't got to that section yet...As I said, I'm sorry about the misinformation. Thought I could trust...
  8. I'm sorry, I didn't intend to be a wise-ass. I...

    I'm sorry, I didn't intend to be a wise-ass. I thought I could trust a source such as cplusplus.com, from where I learned that templates can't be split into multiple files. A quote from their...
  9. You cannot split templates into multiple files.

    You cannot split templates into multiple files.
  10. Replies
    5
    Views
    1,546

    You do realize that a CString holds more than one...

    You do realize that a CString holds more than one value, right? It's kinda like an array holding x-numbers of bytes. Basicly, you want to convert n*B to just 1*B, without even knowing n. To me, that...
  11. Replies
    22
    Views
    2,578

    Someone should just write the ugliest code they...

    Someone should just write the ugliest code they can imagine, that still fulfill those extremely simple criteria.:devil:
  12. You need to dereference your pointer. Put a * in...

    You need to dereference your pointer. Put a * in front of it to dereference it.

    Right now, you are trying to compare the integer to the address that the pointer holds, not the actual value stored...
  13. Replies
    6
    Views
    2,091

    Theres something wrong with your function...

    Theres something wrong with your function declarations.

    I moved the main() to the end of the file and removed the


    void Read (patient [],int&);
    void Find (patient [],int,int&);
    void Display...
  14. Replies
    18
    Views
    2,826

    Thank you C_ntua and Elysia, I think I got it...

    Thank you C_ntua and Elysia, I think I got it now! :)
  15. Replies
    18
    Views
    2,826

    C_ntua: I am sorry that I didn't clarify that...

    C_ntua:

    I am sorry that I didn't clarify that I know about destructors. I simply left them out of my example because I figured they were out of the scope of my question.

    In my first example i...
  16. Replies
    10
    Views
    20,218

    Oh ofc, I was being sloppy. The point is that...

    Oh ofc, I was being sloppy. The point is that they are C, not C++, though.
  17. Replies
    18
    Views
    2,826

    Oh, so for example when I need to create an...

    Oh, so for example when I need to create an object outside the scope of the function, i use new and then pass the pointer on, and then that object will live after the function exits, but if I create...
  18. Replies
    10
    Views
    20,218

    I agree. I don't see much c++ in there. For...

    I agree. I don't see much c++ in there. For example, "malloc", "realloc", "fgetc", "printf" are C-operators.
  19. Replies
    18
    Views
    2,826

    When to handle memory explicitly?

    Hello, I'm new to these fora.

    I used to "play around" with C and C++ 10 years ago, and I have been coding different languages a little bit also, like asm (embedded systems), PHP, e.t.c.
    ...
Results 1 to 19 of 19