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 wOOdy-Soft 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: *

  • Users: sirbu
  • Content: Threads
  • Order by date
  1. sirbu

    Passing to a function just a member of a struct

    Can it be passed to a function just a member of a struct so that the function changes that member? Let's say a have a struct struct node { double attribute1, attribute2; } *n; I define an array of the above tipe, n = (struct node *) calloc (666,(sizeof (struct node))); The question...
  2. sirbu

    extern variables in WinMain and how to use GetVolumeInformation.

    Hy everyone, first a question: I have a C file where the WinMain function resides, and where on the WM_COMMAND case I handle menu options. As an example on IDM_FILE_NEW I launch a dialog box from where I get some input which I convert to numeric variables. The dialog function I've wrote in a...
  3. sirbu

    win32 api call in C

    I have a dialog with an edit box written in C (à la Petzold). What I read from the edit box with GetDlgItemText function I convert to a double with an expression like: kk = strtod(szText,&rpt); Then I want to pass the variable kk to a MessageBox, so I use wsprintf(szBuffer,TEXT("Your...
  4. sirbu

    Working with files in C

    Let’s say that I have a variable char filename[12] = "xxxxxxxx.xxx"; and a function who opens a file. void OpenFile( char *fname) { FILE *f; f = fopen(fname,"w"); if( f == NULL ) { printf( "File could not be opened\n" )...
  5. sirbu

    How to define a boolean data type in C?

    Please can anyone help with suggestions about how to define a Boolean data type in C? For my logical tests now I use one integer and if the condition is TRUE the integer takes value 1 and if FALSE the integer gets 0. But that's rather complicated. If anyone has a simpler way please let me...
  6. sirbu

    Help on functions that returns an array

    Hy,<br>please can anyone tell me how to write a function that returns an array. I mean when writing a function like<br><br>return_type funct_name ( arg_type arg1, ....)<br>{}<br><br>the return_type should be an array (of double maybe).
  7. sirbu

    Passing structure components as arguments to a routine

    If i have a structure like :<br><br>struct node {<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;double x,y;<br> &nbsp;&nbsp;&nbsp;&nbsp;} *n;<br><br>i would like to code a routine, called from main program, who reads the two components of the structure.<br><br>void ReadStruct( ? ? ? ? ? ...
  8. sirbu

    How to convert a float value into a char value

    I've written a code in C that performs several computations at various time steps. I want to save the results for each time step in a file. So if anybody can help me, how to change a float type number (the time value ex. 10.25) into a string so i can strcpy it into the file name.<br>ThankYou

Part and Inventory Search

Back
Top