From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-POP-User: abogdantsev.hostopia.com From: "Alexandr R. Ogurtzoff" Organization: Hostopia To: community@altlinux.ru Subject: Re: [Comm] send pointer on struct to function in C Date: Mon, 14 Mar 2005 18:51:18 +0200 User-Agent: KMail/1.7.2 References: <4235A6A7.9020801@ricom.ru> <200503141801.39192.aogurtsov@hostopia.com> In-Reply-To: <200503141801.39192.aogurtsov@hostopia.com> MIME-Version: 1.0 Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: 8bit Content-Disposition: inline Message-Id: <200503141851.19156.aogurtsov@hostopia.com> X-BeenThere: community@altlinux.ru X-Mailman-Version: 2.1.5 Precedence: list Reply-To: community@altlinux.ru List-Id: Mailing list for ALT Linux users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Mar 2005 16:51:28 -0000 Archived-At: List-Archive: List-Post: > А вообще то надо бы вам Кернигана с Ричи почитать ;-) Мне тоже :-) struct Options cmd[]={ ("user", "vasya"), ("host", "vasya@com.ru") }; #DEFINE MAX_INDEX = (sizeof(cmd)/sizeof(struct Options)); Value = get_options("user")->val; struct Options *get_options(char *) Ну а внтури функции цикл по индексу до MAX_INDEX -- Best regards Alexandr R. Ogurtzoff { UNIX is user friendly, it's just picky about who its friends are }