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 SkipVought 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

    Array of pointers multidimensional?

    If you need to dynamically allocate the multidimensional arrays, try: #include <memory.h> #include <string.h> #define DIM_ONE_SIZE 10 #define DIM_TWO_SIZE 256 int main(){ int i; //Allocate dimension one char** multiDimArray = calloc (DIM_ONE_SIZE, sizeof(char*))...
  3. 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...
  4. 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...
  5. RealityVelJackson

    Advice: Bridging the gap from a graduate to a professional

    Thanks a lot for the suggestions
  6. RealityVelJackson

    Advice: Bridging the gap from a graduate to a professional

    I'll give you the benefit of the doubt and assume that you misunderstood the question... All I'm asking for are some project suggestions that others may have found insightful to sharpen my understanding of the subtle areas of the C programming language... I have a very strong understanding of...
  7. 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...
  8. 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*)...
  9. RealityVelJackson

    Proper error handling with strtok( ) ?

    That'll do it, I was not aware of the strsep() function. In this case, suppose the data is coming straight from a DB table dump... I'm sure that 'many' programs have been written in C to parse this kind of information... Can you suggest a more elegant solution that performs the necessary error...
  10. 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