Archived

This topic is now archived and is closed to further replies.

WizHarDx

A few general questions

Recommended Posts

Hi I have a few questions about C/C++ programming. If you can answer any I would be most grateful. 1 Ok I sort of know what a thread is , it''s a ways of simutensly (damn spelling) doting diffrent tasks withoug being in the message loop could further explain & also show me how to use please. 2 I keep on seeing the keyword , "inline" next to functions as if it changing the linking or something what the hell does it mean ? 3 I know how to use some streams like file streaming using fstream.h . All I know is that a stream is a class that holds the number of bytes a object takes up & sends it to the destination & also recives an object & checks on it bytes. Could someone further explain my understanding of this subject & how would I make a stream to use for myself. thanx in advance WizHarD

Share this post


Link to post
Share on other sites
1) Threading can get complicated, look here for more info

2) Inline expands the code "inline" - normally a function is called, and only one copy is in RAM. Inlining puts that functions code inline with the code it's called from, so a copy is made every time it's called. Short operations are faster when they are inlined, inlining long functions can dramaticaly increase the file size and actually make it slower (due to page faults, which has to do with virtual memory management)

3) Um, well yeah that's more-or-less all a stream is. You need something to stream, before you go about making a streaming class for it. A related process is called serialization, and another is persistence, which can be used to send data over a network or save it to disk.

Edited by - Magmai Kai Holmlor on October 14, 2001 6:04:58 PM

Edited by - Magmai Kai Holmlor on October 14, 2001 6:05:11 PM

Share this post


Link to post
Share on other sites