Hi all,
Im using gethostbyname() to resolve a domain name or IP but i am having 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...
Hi all,
in an attempt to exercise my socket programming/class writing skills, i have come accros a small problem in the class i am delevoping - it just a simple socket/server class under Unix (BSD).
my class is nothing to fancy and is derived from an old socket server/client program that i...
Hi all,
can anyone tell me if there are any restrictions on the 'types' that can be returned from within a function? i.e. (int, float, vector, 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...
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 ...
Hi all,
Does anyone know how i could refernce 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...
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...
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...
Hi all - can anyone explain how i could delete a character at the end of a string (char*), namely "\n". 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 */...
hi all,
heres a nuebie question for ya.. I'm trying to create infinite loop that continually assigns the results of some called functions to various variables, but i'm having a problem with re-assignment of the variables on the second loop? Basically I get a core dump!
Could anyone point me...
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...
Hi all,
I have been trying to run some perl scripts via sendail, and had varing degrees of success in the past (using earlier versions of sendmail) but have never managed to get it working just right.
having recenty upgraded my box (FreeBSD 4.7-RELEASE) i have encountered further problems...
Hi all,
I have some pipes in my alias file that run some scripts, except, i get error sent to postmaster telling me that I do not have permission to do various things. It appears that the scripts are running as 'me' and not 'root'.
My questions are:
Why are the scripts running as 'me' and...
Hi all,
I have a small problem thats driving me mad! I have setup some pipes through my alias file that run various scripts when a mail arrives for certain users.
They all work fine from the command line (Unix) but SOME fail to run, or rather, have no output! The maillog claims the mail is...
Hi all,
I just installed bsd (from ftp via 2nd iface ->dsl) 4.6.2-release in preparation for an upgrade, only, when it got to installing the linux compatability libraries i got an error from the installation program 'Got signal 11' - this happened when connecting to the same ftp that it had...
Hi guys,
Long time no see. I have a strange, but no doubt common problem. I have been on a break from C for a while, been working with C++. I wanted to modify an old program i wrote in C only to find the when i complied it it gave me an error:
iomanip: No such file or directory
Now...
Hi all,
Not been in here fo a while, hope someone can help. Basiclly, i have some HTML files that i need to correct errors in. I want to be able to do run a script with some parameters that will produce a new HTML file, with subtitutions. e.g.
commad will be ...
# fix-code.scr $1 $2 $3...
Hi all,
I have just started a to write code in c++ under windows ME , and I have also been writing code under unix. With this i mind, is it possible to use the windows .lib and .h library and header files under unix? Can one be converted to the other? E.g. Can i convert .lib file to .a ,or...
Hi all,
I have just started a to write code in c++ under windows ME , and I have also been writing code under unix. With this i mind, is it possible to use the windows .lib and .h library and header files under unix? Can one be converted to the other? E.g. Can i convert .lib file to .a ,or...
Hi there,
Im new to 'c' and i am trying to do a pass a command line option to my program but i cannot get it to work.
Here is my code ...
#include <stdio.h>
#include <stdlib.h>
main(argv,argc)
int argc;
char *argv[];
{
printf("\nYour input was %s\n\n",argv[1])...
Hi all,
Can anyone help with this one. i'm trying to use the 'system' command in a foreach loop with a perl array but can't get it to work. Heres what i'm doing ...
foreach (@ARRAY)
{
system('dig -x [@ARRAY] hinfo');
next
}
the DNS lookup is being done on "@ARRAY". The...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.