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 Wanet Telecoms Ltd 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. JaybOt

    hostent query

    Thanks itsqsd, Havent had a chance to modify my code and test this yet, but ill post again when i do and let you know how i get on! I cant see that i'll have any problems though .. regards, J@yb0t[afro] Always know what you say, but don't always say what you know!
  2. JaybOt

    hostent query

    ...trouble trying to return readable data from the member function h_addr_list[0]. Here is a code snippit of what im trying to do .. struct hostent *he . if((he=gethostbyname(host))==NULL) { exit(-1); /*exit on failue*/ } my problem is in trying to print the data held in...
  3. JaybOt

    How to open ports on FreeBSD firewall?

    Hi m8, Try checking the firewall log for entries with your servers IP address (/var/log/ipfw.log i think), type .. #ipfw show - to see the current state of the firewall, to add rules use the following format .. #ipfw add allow ip from <HOST> to any 2021 via any #ipfw add allow ip from <HOST>...
  4. JaybOt

    Hi all, in an attempt to exercis

    Thnks Clairvoyant1332 - you certainly do poses some kind of physic abillity!!! I had toyed with the idea of a signed/unsigned int but was not sure which struct to use to declare it. Thanks again m8, u r a Star! Jaybot[afro] &quot;Always know what you say, but don't always say what you...
  5. JaybOt

    Hi all, in an attempt to exercis

    ...from the socket once it has been accepted, only ,when i compile the server application i get the following error: SocketClass.h:169: passing `int *' as argument 3 of `accept(int, sockaddr *, socklen_t *)' changes signedness my class method is as follows : int...
  6. JaybOt

    Functions and return types? (char *)

    Thanks m8 &quot;Always know what you say, but don't always say what you know!&quot;
  7. JaybOt

    Functions and return types? (char *)

    ...ect.) Yes, i have already posted another thread on the same subject, but what i need to know is how i can return an array if characters (char *) from a function. I have tried the prototype .. char* myFunc(void); .. to no avail. Please, please, please can someone point me in the right...
  8. JaybOt

    hi yal' Can anyone tell me the b

    hi yal' Can anyone tell me the best way to return char* from a function/class method. All i need to do is return a string of chars when the func/method is called. I have also tried using ... string myClass::myMethod(void)... but no luck there either. my code looks like this.. in class ...
  9. JaybOt

    Question, re: AnsiStrings

    ...a single character in an AnsiString, such as the one provided by the Edit->Text control. I have tried variations on a theme, such as .. char* name for (i = 1; i <= Edit->Text->Length; i++){ name[\i] = Edit->Text[\i]; } .. but the problem seems to be that the char* in the edit control...
  10. JaybOt

    Back to basics...connecting with TcpClient?

    Hi all, I am trying to use TcpCliet to create a small application to conect to my server (FreeBSD Unix) on port 25 (im not trying to send email, just using it for testing). I am used to doing this with Unix TCP sockets (c++) but with windows (XP) (c++ builder) I cant quite get the TcpClient...
  11. JaybOt

    Searching for a set of chars a string

    Sorry mate, got it working now! Another error was the reason it did not work! Regards, J@yb0t[afro] &quot;Always know what you say, but don't always say what you know!&quot;
  12. JaybOt

    Searching for a set of chars a string

    Thanks m8, Tried that, but get the same result - any substring searched for returns 'found'. Doesn't strstr() require all the chars of the main string and substring to be of the same CaSe? This would not work for me as i have no way of knowing what case the main string (file) will be in...
  13. JaybOt

    Searching for a set of chars a string

    Hi all, I have written some code to open a file and check for a tag (string) within that file. No matter how it is coded, the result does not appear to be correct. The code should return 'found' if the string was in the file, and 'not found' otherwise, but it does not appear to work...
  14. JaybOt

    char * gaining extra characters

    Hi, Smells like memory leakage! Try changing .. smiles = (char *)calloc(index, sizeof(char)); to .. smiles = (char*)malloc(sizeof(128)); or smiles = (char*)calloc(char,sizeof(128)); Regards, j@yb0t[afro] &quot;Always know what you say, but don't always say what you...
  15. JaybOt

    Hi all - can anyone explain how i c

    Thanks Daniel! Tried that but could not get it to work, ended up just copying all chars in the string but 1 (char by char cpy): for(j=0; j < strlen(nulstr)-1; j++){ newstr[j] = nulstr[j]; Bit crude, but does the job. Thanks anyway! J@yb0t[afro] &quot;Always know what you say...
  16. JaybOt

    Hi all - can anyone explain how i c

    Hi all - can anyone explain how i could delete a character at the end of a string (char*), namely &quot;\n&quot;. I have a function that gets the time ... void GetTime(char *ti) { time_t rawtime; struct tm *timeinfo; char *timedata; time ( &rawtime ); /* Get the time */...
  17. JaybOt

    hi all, heres a nuebie question

    ...sure how to implement this at first and could not get things to work as i wanted, but then I tried setting up buffer like this.. buffer = (char*) calloc(128,sizeof(char*)); .. and got a result! Now i can do myVar = buffer; just before my assignment to effectively 'clear' the address...
  18. JaybOt

    hi all, heres a nuebie question

    ...dump! Could anyone point me in the correct direction. Here is some pesudo code to show what i mean am doing... main() { int sentinal; char *GetValue; char * value; sentinal = 1; while (sentinal !=0) { value = GetValue(); /* returns a char* */ printf(&quot;Value is...
  19. JaybOt

    which Stuct def is used to get filetime info?

    Thats great, Thanks! Thats exactly what i was thinking of - struct s_stat - and well done! I didn't think anyone would get it from that criptic clue! [thumbsup2] Regards, JayB0t [afro] &quot;Always know what you say, but don't always say what you know!&quot;
  20. JaybOt

    which Stuct def is used to get filetime info?

    Hi all, Can anyone recall the struct definition used to get a files creation times? (unix C++) I think the call is passed two arguments, one is the filename, and the other is this struc def; Not sure if this makes any sence! Also, if you could provide an example of how it is used (defined) it...

Part and Inventory Search

Back
Top