many thanks to you all
Type: Posts; User: Seron
many thanks to you all
How could I write to a text file so that it appears in column format? This is for a .log file.
It should look something like this:
<date> <address> <file>...
Thanks for your help. I still get a strange date and time. This part of the code now looks like this:
recv(sock, &time, 4, 0);
time = ntohl(time);
tsp = ctime(&time);
printf("%s\n", tsp);
Thanks for the quick replies.
I've got the right format now for the time, but it is not showing the correct time, unless that is what the server sends me.
more questions:
1) How could I...
Hi,
I'm working on a small school assignment where I should make my program on a Solaris that connects to a server with TCP and gets a 32-bit integer that contains the time which should then be...
Have a look here: http://www.doc.ic.ac.uk/~wjk/C++Intro/RobMillerL7.html#S7-5 It explains in a good way how linked lists work and has got illustrations. This site helped me to understand the concept....
When you create a variable it will always have a memory address allocated for it, even if you don't initialize it. The contents of that variable will in that case be unpredictable i.e. garbage. I...
If you've appended the path as described in the readme.txt you can compile in any directory. Just put your .cpp file in any directory and run the compiler from there. Then the .exe will be in that...
How about prefixing a 0 if int / 10 < 1 ?
You include it in the same way as a header file. In the main.cpp file add #include "yourfile.cpp" .
In that .cpp file usually goes the implementation of whatever you've declared in the header,...
Look at the code below. When the Hen object is created, is a Nest and Egg created inside of it? Or are the structs independent apart from scope? It seems to be so when it is allowed to create an Egg...
Did you make the additions to the environment search path and create the .cfg files as is written in the readme.txt? I believe that you can choose to include or not include the .h . Both should work....
Have a look at this one. It helped me a lot to understand linked lists.
http://www.doc.ic.ac.uk/~wjk/C++Intro/RobMillerL7.html#S7-5
Seron
Is your program a console program that prints more information than can fit on the screen?Then you can also use the MORE switch to pause the screen output after one page.
It is used like this:
...
Sorensen wrote:
Ok, but how would I display those addresses? I've tried the below code and it doesn't work.
#include <iostream>
using namespace std;
void main() {
Thanks for the answers guys.
Bubba wrote:
How does the program know not to read any more characters from memory?
zMan wrote:
I believe this works in exactly the same way as Bubba's...
Hello,
I've cast the address of a string to a char* . I expected to be able to use the pointer in the same way as other types, but it behaves quite differently. Could someone explain what is going...
Hi,
I made a program for an exercise that is in a book I use to teach myself C++.
The code works, but I would be grateful if someone could have a look and write something about the structure of...
Many thanks for all the answers. Code-genie seems to be just what I was looking for.
Vim appears to be cool too, now that I've learnt to read the text on the screen :) . It even has a built in...
Hello,
Which editor would you suggest to use for C++ coding? I'm using the free Borland 5.5 compiler with Notepad at this time. Is there an editor that recognises C++ keywords and colourcodes them...
My book says something to the effect that parentheses around the type or around the variable are equivalent and inherited from C. C++ includes the more explicit cast form static_cast<float> and is...
aaaha,
Thanks man!
Hi,
When I use cout to print a double it only shows the first few digits of the mantissa. Why is that? How could I make it print the whole thing?
Seron
Can #define and #undef flags be used from the Borland compiler command line?
Seron
Thank you zMan.
One more question. Why is Mickey < Pluto ?
Seron