C/C++ :: Program To Make User Login And Registration Using Textfiles?
Nov 21, 2014why it doesn't enable to register except one time
View 1 Replieswhy it doesn't enable to register except one time
View 1 RepliesHow to compare the username and password entered by user with the data(username and password saved in before) in the admin array and customer array,
so for example when it match the username and password in the admin array, it will directs the user to the admin_mainmenu(), otherwise it directs to the customer_mainmenu().
#include <iostream>
#include <fstream>
#include <string>
using namespace std;
char username_admin[10];
char password_admin[10];
[Code] ....
I cant seem to be able to make a new user and i cant seem to log in it just says invalid login.
#include<iostream>
#include<cstdio>
#include<cstdlib>
#include<fstream>
#include <string>
using namespace std;
void welcomeScreen() {
[Code] ....
How to compare the username and password entered by user with the data(username and password saved in before) in the admin array and customer array,
so for example when it match the username and password in the admin array, it will directs the user to the admin_mainmenu(), otherwise it directs to the customer_mainmenu().
#include <iostream>
#include <fstream>
#include <string>
using namespace std;
char username_admin[10];
char password_admin[10];
[Code] ....
So I'm trying to make a program that asks the user for a number and then prints a statement the same number of times the user entered. 3 different statements, using the 3 loops (for, while, and do while). I made the program but for some reason the statement from the do while loop goes off infinitely.
MY CODE:
The error:
I have two questions about C programming here :
1. I want to make a file in the program directory that can't be deleted by user out of the program make that file.for example if I make a file named "123.xyz" by the program named "text.exe" and then exit test.exe ,if I tried to delete the file 123.xyz I faced the error and I could not do it but by the test.exe program that make that file.
2. I heard about a function called "Parbegin()".any way i want to know is there any possible way to run two or more functions of a file.c together,like the parbegin function did an do in OS?
I need to write a program to make the user input some text, and the first letter of each word has to be uppercase. (have to use while loops)
So for example lets say the user inputs:
i lOvE pRoGrAmMiNg
The output needs to be:
I Love Programming
Code: int main()
{
char c, lower_c;
printf("Enter Text");
while (c != '' && c >= 0)
{
if (c >= 'A' && c <= 'Z')
lower_c = c + 32;
else
lower_c = c;
[Code]...
I have started this code by making the letters lowercase (I don't know if this was the right way to approach this, ). I am not sure how proceed after this step, the step of making the first letter uppercase. (PS for the program, loops should be while loops)
I have my Reverse Polish calculator compiling and everything but for the assignment I need to handle a few exceptions that I can't seem to get. First off I'm trying to make the program exit if the user enters only "0" but since the input i'm using is string, I cant figure out how to code
"If the first node is 0 and the next node = NULL, return true"
Here is my code:
#include<iomanip>
#include<iostream>
#include<stdlib.h>
#include<stdio.h>
#include<string>
#include<sstream>
using namespace std;
class Stack {
[Code] .....
I am trying to make a simple login program that reads username and password from a text file.
In my text file I have:
name1;pass1
name2;pass2
name3;pass3
name4;pass4
name5;pass5
Everything is working okay with name1 and pass1, but if I try to log in with different credentials, for example name2 and pass2 it says "invalid details"
Here is my code:
string user, chuser;
string pass, chpass;
string los;
ifstream loginData("logindata.txt");
cout << "Please type in your username:" << endl;
getline(cin, user);
[code].....
I am writing a program to auto login in a web site. Before making next attempt I have to wait for some time like some 10 seconds(it is configurable). But during waiting UI should not freeze. I wrote code something like this. Here event m_hEvent[1]) will be set by another thread after 10 seconds.The problem is UI still freezes some times!
while(1)
{
//m_hEvent[1] will be set by another thread after 10 seconds
dwRet = MsgWaitForMultipleObjects(1, &m_hEvent[1], FALSE, dwMilliseconds, QS_ALLINPUT);
ResetEvent(m_hEvent[1]);
[Code] ....
ive done a code for taxi's that arrive and depart, but i was wondering how i can use names of taxis as registration instead of numbers?
View 1 Replies View RelatedRequirement: the AddRegistration method in the RegistrationDB class should accept a Registration object and return a Boolean value that indicates if the operation was successful
a brief overview. Form with two combo boxes and a button, when you click the button the data from the combo boxes is entered into a table in the connected database...
I have a text file containing the names and surnames of enrollment numbers and grades of students , looks like this:
RIKI Rikic E2345678 10
JUPI jupic E1232345 9
Etc ......)
I'm interested in sorting by name and surname, registration number and grade.My example:
struct student {
string name;
string surname;
string enrollment;
int grade;
};
and in the main program
int main () {
Student STUDENT;
/ / Code to read a text file that I wrote so I have ...
switch ()
case '1 ': / / sort by name
case 2: / / by surname
Case 3 / / by enrollment
Case 4 / / by grade
this sort we are not going very well .
I have been creating this program for a student registration system. For the file handling So far I can write in to a file , view all records, and search a single record. now i got the problem with updating details . my coding is as bellow ..
void file_update() {
int r;
struct student stu;
fstream stu_file;
cout <<"========Update Record======"<< endl;
stu_file.open("student.txt", ios::app );
[Code] ....
My problem is it won't update the record. it just adding a new record.
I'm making a program for a MMO I play. It calculates the cash and resources needed to build certain 'modules'. I'm having trouble to do something very simple : make a loop until the user asks to break the loop. Here is what the interface looks like :
What module do you want to install?
(Examples: 'Avenger' or 'VLLT')
dd // I input this
DD. COST each : 60,000 cr.
How many do you want? (Modules left:15)
(NOTE : You may enter a negative number if you made a mistake)
3 // I input this
Current Total Module Price : 180000 cr
+6 droids
[Code] ....
The bigger code box below is a part of the code I made. What I deleted is uninteresting, it's just the same thing again : other resources, other 'modules'...
#include <iostream>
#include <string>
#include <algorithm>
using namespace std;
int main() {
struct resources// Defines the amount of resources and their price
[Code] ....
How to make an array which stores the values i'm getting from the users?
For example if i have a function which allows the user to give me values, how can i store them in an array.
I am working on a program in C# that should make a user choose a specific path for the program to work.
The path they are choosing is a path for a game and from that selected path I use coding to load pictures from to the program.
Anyhow
I am able to make the user choose a path and save the selected path in a xml file.
But the user can select ANY path.
How could I do to make the user choose a specific path that I want them to choose?
#include <stdio.h>
#include <string.h>
#define MAX 1000
main()
{
char text[MAX], c;
int i,s;
[Code]...
I need to edit the code here to make the input by the user show up reversed
puts("
Your reverse input is:");
for(i = length - 1; i >= 0; i--){
printf("%c",text[i]);
}
I know this is not right...
Write a program to ask a user to input a symbol from the keyboard and to output that symbol in a n X n/2 sized V where n = the width of the V. You must use a loop to process the data
I am stuck at trying to figure out how to do the actual output formatting. This is where I am sitting currently.
string character = "";
int vheight = 0;
Console.WriteLine("Enter the character you wish to use for your V: ");
[Code]....
so Im really just a bit stumped on how to get the actual V shape to be formatted..
I'm trying to make a program that you input your login info and it writes that info to a text file. Then, later on once I get my problem fixed, the program will read the info to the user. my code is as follows(the input part is a bit lengthy):
// Password Log
#include <iostream.h>
#include <fstream.h>
#include <string>
#include <time.h>
using namespace std;
ofstream login;
[Code] ....
What my problem is when I choose "Input new login info" it automatically inputs I have no clue, and calls next program.
I need to write a C program to make the user input some text,and the first letter of each word has to be uppercase.(have to use while loops)So for example lets say the user inputs:
i lOvE pRoGrAmMiNg
The output needs to be:
I Love Programming
Code:
#include <stdio.h>
int main()
{
int i = 0;
char c, lower_c;
printf("Enter text
");
[code]....
I have started this code by making the letters lowercase.I am not sure how proceed after this step, the step of making the first letter uppercase.
"How to create login id and password" because i have to submit this assignment next weeks i dont know how to using passing by value or reference corectly/
For the Ouput its say this :
1>ClCompile:
1> GILA DAH!!.cpp
1>d:computer programmin ditg 1113jiwa ku sakitjiwa ku sakitGILA DAH!!.cpp(21): error C2664: 'strlen' : cannot convert parameter 1 from 'char' to 'const char *'
1> Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
1>
1>Build FAILED.
#include <iostream>
#include <string>
using namespace std; //introduces namespace std
void length(char[]);
[Code]...
I have to make a program that asks for your username (any)to register it. When you type it it will say something. I want to create a txt file also. so this is what I have:
#include <iostream>
#include <fstream>
using namespace std;
int main() {
int a;
{
ofstream myfile;
[Code] ....
now, how can I use the cout again to print something "Welcome to the program..."?
I would like to know how can I make a simple program .exe so that I don't have to open it through code blocks every time.
View 2 Replies View RelatedI'm trying to write a program for a lab, I know how easy it is but cant see to crack it.
I need to make a program using while or for loop.
I must have the user type a number, for an input value an output value but then do it again several times but without it going on forever asking again and again.
i need to write a program that when run makes another exe file . Eg: make a program named 'sxes' and compiled it. When i execute or run sxes a new exe file named 'new01.exe' is created. This new01.exe when executed must input two numbers and add them and print output. I want to write a program same as installer file .
View 11 Replies View Related