Computer Help and Spyware Removal Computer Help and Spyware Removal Computer Help and Spyware Removal Computer Help Forums Windows Startup Programs Database Spyware and Malware Removal Guides Computer Tutorials Uninstall Database File Database Computer Glossary Computer Resources
 

Welcome Guest ( Log In | Click here to Register a free account now! )



Register a free account to unlock additional features at BleepingComputer.com
Welcome to Bleeping Computer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.
Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.


Important Announcement: We have two terrific contests running on the site that I wanted all our members and guests to know about.

The first contest is the HP Magic Giveaway, which is underway as of November 28th. More information can be found at this topic, which will be updated very soon with further information.

The second contests, is for the chance to win two Seagate FreeAgent external hard drives. More information about this contest can be found here.

These are both amazing contests and I suggest everyone submit an entry for them.

- BleepingComputer Management
 
Reply to this topicStart new topic
> Guess this ones for you raw
brunt
post Jul 21 2004, 11:02 AM
Post #1





Guests






when i write a socket program to connect to a server its giving an error in line "struct sockaddr_in addr".

the error is "storage size of 'addr' isnt known"

earlier i used to do programs in c with structures but i dint come across this kind of error. ANy suggestions?
Go to the top of the page
 
+Quote Post
Grinler
post Jul 21 2004, 01:17 PM
Post #2


Bleep Bleep!
******

Group: Admin
Posts: 29,441
Joined: 24-January 04
From: USA
Member No.: 3



Moved to programming forum. tsk tsk

Add this as an include :

#include <netinet/in.h>


--------------------
Lawrence
Go to the top of the page
 
+Quote Post
brunt
post Jul 21 2004, 01:33 PM
Post #3





Guests






sorry about that figured I should put this in linux. It's for SuSe not for windows. Again will keep it in mind next time.
Go to the top of the page
 
+Quote Post
Grinler
post Jul 21 2004, 02:45 PM
Post #4


Bleep Bleep!
******

Group: Admin
Posts: 29,441
Joined: 24-January 04
From: USA
Member No.: 3



Yeah anything programming related we want in here.

Did adding that include fix the error?


--------------------
Lawrence
Go to the top of the page
 
+Quote Post
raw
post Jul 21 2004, 03:02 PM
Post #5


Bleeping Hacker
******

Group: BC Advisor
Posts: 1,981
Joined: 14-April 04
From: Texas
Member No.: 151



Well from what you gave me your structure is not correct

struct struct_tag {
data_type1 variable1;
data_type2 variable2;
.
.
}
Remember a structure is an array of variables of different types (int, char, float)


--------------------
Go to the top of the page
 
+Quote Post
brunt
post Jul 21 2004, 05:22 PM
Post #6





Guests






Thanks Guy's SOrta Figured it out. Yes Grinler It helped Heres what I had to input

#include <sys/types.h>
#include <sys/socket.h>
#include <unistd.h>
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



Lo-Fi Version Time is now: 2nd December 2008 - 02:45 AM


Advertise   |   About Us   |   Terms of Use   |   Privacy Policy   |   Contact Us   |   Site Map   |   Chat   |   Tutorials   |   Uninstall List
Discussion Forums   |   The Computer Glossary   |   Resources   |   RSS Feeds   |   Startups   |   The File Database   |   Malware Removal Guides

© 2003-2008 All Rights Reserved Bleeping Computer LLC.