?
Solved

beginnner in C

Posted on 2003-03-06
6
Medium Priority
?
166 Views
Last Modified: 2010-04-15
Can anybody help me create a creative & cool login and password into a welcome menu screen that i never seen before.(programming in C)( C.cpp)

I am an beginnner in C
and i need an expert to help me as soon as possible.
0
Comment
Question by:micheal33
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 

Author Comment

by:micheal33
ID: 8081174
I need as soon as possible
0
 

Author Comment

by:micheal33
ID: 8081198
Need help
0
 
LVL 6

Accepted Solution

by:
gj62 earned 160 total points
ID: 8081389
Define "cool"?  What platform are you on?  Is this in a GUI, or a console?

Assuming a console, the *basics* would be the following code, which I brazenly copied from a posting of Exceter's a few days ago...

This prompts a user (at the console) to enter a password, the password is hidden by *'s, and it allows backspaces.  Once you have the entered password, you can compare to an existing password by using:

if (strcmp(s,password)==0)
  printf("Password is correct");

#include <stdio.h>
#include <conio.h>
#define STRLEN 25

void input( char*, int );

int main()
{
   char s[STRLEN];
   printf("Enter password: ");
   input(s,STRLEN);
      printf("\n\n%s\n",s);
   return 0;
}

void input( char* buffer, int length )
{
 int pos = 0;
 char c;

 buffer[0] = '\0';

 while( ( c = getch() ) != 13 )
 {
     if( c != 8 && pos < ( length - 1 ) )
     {
         printf("*");
         buffer[pos] = c;
         pos++;
     }
     else if( pos != 0 && c == 8 )
     {
         printf("%c %c",8,8);
         pos--;
     }
 }
  buffer[pos] = '\0';
}
0
 
LVL 8

Assisted Solution

by:akshayxx
akshayxx earned 160 total points
ID: 8085249
programming in C . but what platform you are ON.. linux/windows ?
anything else .. any specific GUI library that u are already using ..
and as gj62 mentioned .. DEFINE "COOL"
for me anything that works is cool .. be it console based OR gui based..
its just that client prefer GUI stuff, which i hate coding .. to read a string u need to do so much of work .. :D

but most gui libraries reduce that work significantly..

so if u r looking for flashy GUI based stuff .. first choose some GUI library .. for linux i wud suggest .. GTK OR libQT.
for windows .. MFC has it all.. and if u want free stuff..
WxWindows.. ( thhis one is cross-platform )


0
 
LVL 20

Expert Comment

by:jmcg
ID: 10089344
Nothing has happened on this question in more than 10 months. It's time for cleanup!

My recommendation, which I will post in the Cleanup topic area, is to
split points between gj62 and akshayxx.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

jmcg
EE Cleanup Volunteer
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is a short and sweet, but (hopefully) to the point article. There seems to be some fundamental misunderstanding about the function prototype for the "main" function in C and C++, more specifically what type this function should return. I see so…
Examines three attack vectors, specifically, the different types of malware used in malicious attacks, web application attacks, and finally, network based attacks.  Concludes by examining the means of securing and protecting critical systems and inf…
The goal of this video is to provide viewers with basic examples to understand and use structures in the C programming language.
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use nested-loops in the C programming language.
Suggested Courses
Course of the Month12 days, 22 hours left to enroll

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question