========================================================================
       CONSOLE APPLICATION : NamesArray
========================================================================

Title:    c
Name: NamesArray
Web-Link: http://www.arabteam2000-forum.com/index.php?showtopic=120472
Description: Load web page using Microsoft Web Browser ActiveX control,
Department: C, C++, C.Net forum
Develop Using: Microsoft Visual C++ 6.0
Assistant Tool(s): 
Version: 1.00
Last update: 12 March 2007
Date: 12 March 2007
Time Zone: (GMT + 02:00) Cairo
Author: Eng. Usama El-Mokadem: musama@hotmail.com

Topic(120472) [Mar 12 2007, 03:03 PM]: By St0rM-m4n: http://www.arabteam2000-forum.com/index.php?showuser=105104
=======
-----BEGIN TOPIC-----
     

#include<stdio.h>
main()
{
      int x;
      int y;
      char array[x];
      printf("how many numbers of names :");
      scanf("%d",&y);
      for(x=0;x<y;++x)
      {
	scanf("%dst name:%s",&x,array[x]);
      }
      for (x=0;x<=y;++x)
     {
                           printf("\nNames are %s",array[x]);
     }
}

   
  
     
       array     
               microsoft errore sender 
 
-----END TOPIC-----

Solution:
=======
-----BEGIN SOLUTION-----
#include "stdafx.h"
#include<stdio.h>

#define	MAX_NAMES		101
#define	MAX_NAME_LEN	81

int main(int argc, char* argv[])
{
	int x;
	int y;
	char array[MAX_NAMES][MAX_NAME_LEN];

	printf("How many names?: ");
	scanf("%d", &y);
	flushall();

	printf("\r\n");
	for(x=0; x<y; x++)
	{
		printf("Name[%d]: ", x+1);
		gets(array[x]);
	}

	printf("\r\n");
	for (x=0; x<y; x++)
		printf("Name[%d] is: %s\r\n", x+1, array[x]);

	getchar();

	return 0;
}

   
-----END SOLUTION-----

Attachments:
============
NamesArray.zip
The (Attached) Solution Suggested By Eng. Usama El-Mokadem: http://www.arabteam2000-forum.com/index.php?showuser=98027

CONTACT INFORMATION:
=======================
  Eng. Usama El-Mokadem
  Email: musama@hotmail.com
  Web: http://musama.tripod.com
  Mobile: 0020 10 1289308
  Egypt

========================================================================

AppWizard has created this NamesArray application for you.  

This file contains a summary of what you will find in each of the files that
make up your NamesArray application.

NamesArray.dsp
    This file (the project file) contains information at the project level and
    is used to build a single project or subproject. Other users can share the
    project (.dsp) file, but they should export the makefiles locally.

NamesArray.cpp
    This is the main application source file.


/////////////////////////////////////////////////////////////////////////////
Other standard files:

StdAfx.h, StdAfx.cpp
    These files are used to build a precompiled header (PCH) file
    named NamesArray.pch and a precompiled types file named StdAfx.obj.


/////////////////////////////////////////////////////////////////////////////
Other notes:

AppWizard uses "TODO:" to indicate parts of the source code you
should add to or customize.

/////////////////////////////////////////////////////////////////////////////