i.e. instead of "filename", have the user enter "c:/directory/filename"
Type: Posts; User: Walle
i.e. instead of "filename", have the user enter "c:/directory/filename"
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...
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...
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...
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...
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...
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...
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...
You cannot split templates into multiple files.
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...
Someone should just write the ugliest code they can imagine, that still fulfill those extremely simple criteria.:devil:
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...
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...
Thank you C_ntua and Elysia, I think I got it now! :)
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...
Oh ofc, I was being sloppy. The point is that they are C, not C++, though.
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...
I agree. I don't see much c++ in there. For example, "malloc", "realloc", "fgetc", "printf" are C-operators.
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.
...