main() {
int i;
struct hostent* he;
struct in_addr** addr_list;
struct in_addr addr;
int port = 80;
he = gethostbyname("google.com");
printf("Name of: %s\n", he->h_name);
}
he outputs null. I added in hosts file my dns. but nothing changing. anyone can help me?
Sure. Forgot it. May be you can help also with that?)
gethostbyname is ancient
Make me c++ expert!
For what?
Just to become good!!!!!!
You don't learn C++ out of curiosity, C++ is a complex programming language with lots of rules that are basically confusing for person who has been programming in Python. I learned decent enough python in 2 weeks where I could make my programs for my Embedded System, I'm still not very good at it but I get the job done. I have been programming in C++ for last 12 years and I still struggle because compiler is finicky too, it would not tell you what is the error, you miss a ";" and it'll tell you there are 100 errors.
Yes ...I am confused but why c++ is in high league.......but many big enterprises use it......but other side I finds that its get used in embedded systems and pay is low......
How much electronics konowledge is required for embedded software dev ? Which book do you advise ? (based on your experience)
I should also say this isn't really related to C++
There are many things, like int a; is an integer. While int *a; make a pointer to the integer which itself could be a 64 bit valve depending on the computer and OS. Lots of things like this, which would be considered confusing for new user who doesn't understand how computers and OS work.
Hmm correct......
I'm electronics engineer so I think 100%, if you just know programming and don't know what is going on in the circuit itself you'll have lots of problems making efficient embedded programs. But again, if the program you're making isn't time critical, I would suggest not to go into embedded programming using C/C++, it is better to use MicroPython.
C errors is quite descriptive for me than ever. Zig, am able to pick up the duck it's trying to tell me I did wrong
Обсуждают сегодня