i think getline method of istream class(e.g. cin is instantiation of this class) would be useful for such issue.
example from cplusplus.com
// istream getline
#include <iostream>
using...
Type: Posts; User: velid
i think getline method of istream class(e.g. cin is instantiation of this class) would be useful for such issue.
example from cplusplus.com
// istream getline
#include <iostream>
using...
#include<stdio.h>
#include<conio.h>
#include<stdlib.h>
#define size 10
void main()
{
int i,s;
char **names;
printf("Enter Size Of Array..\n");
scanf("%d",&s);
Surely, you can use strncmp to do that.
eg.
strncmp (name1, name2,1)
it returns 0 zero if they are equal to each other, or less than zero if first one less than second, or greater than zero if...
Prefer using "/* */" for comments instead of "//" in ANSI standart it is not acceptable.
I don't understand exactly your final problem.
Additional suggestion;
If you need to use such a pattern as,
if (c==1)
{ C-Statements }
else if (c==2)