Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations dencom on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. RealityVelJackson

    Spawn a new console and write to it at run-time (in windows)

    I am writing a multithreaded 'chatroom' style server that constantly broadcasts the messages it receives to all the clients so that they can watch the discussion unfold. Upon a client's successful connection to the server, the client creates a new thread. From inside this thread I would like...
  2. RealityVelJackson

    Returning ptrs to local function variables

    I was under the impression that one shouldn't return pointers to variables that are created inside of a function, unless the variable was static or allocated on the heap. Why does the following code work fine ? In foo1() since str points to a string-literal, I guess the string-literal is...
  3. RealityVelJackson

    Converting MYTYPE* to MYTYPE (impossible ?)

    What can one do if they need to pass an ADT to a function and all they have is a pointer to the ADT ? For example: int main(){ MYTYPE* a = createInstance(); //Call func: doSomething( ??? ) /* ...with a as the argument. In other words, dereference the pointer to...
  4. RealityVelJackson

    Advice: Bridging the gap from a graduate to a professional

    I have a B.A/M.S. in compsci, and one year of professional programming experience... The issue is that most of the development at my last job was in a proprietary scripting language (which was a supremely crippled version of C). Anyhow, I've written many programs in various languages throughout...
  5. RealityVelJackson

    When IS it necessary to cast the return of malloc( )'s ptr

    I've seen 'lots' of C code that explicitly casts the ptr returned by malloc, yet I hear that this is not always necessary. Just when is it necessary (if ever) ? Does the situation differ between C and C++ (even though you'd probably use 'new' in C++) ? MYTYPE* a = (MYTYPE*)...
  6. RealityVelJackson

    Proper error handling with strtok( ) ?

    Suppose I am reading in the following text file, I would like to properly handle missing data between the #-delims when reading. #mike#tyson#11898 #carl#lopez#98878 #vincent##11212 #utah#smith# ... typedef struct{ char* field1; char* field2; int field3; } CUSTOMER; int main(){...

Part and Inventory Search

Back
Top