C++ :: New User Login System Error

Mar 18, 2013

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] ....

View 14 Replies


ADVERTISEMENT

C++ :: Login System Which Load Data From Dat

Apr 20, 2014

I am trying to make a log in system which load data from a .dat .... So I have a part of code below

if(radioButton1->Checked)//Login {
String ^ userAC = textBox1->Text;
String ^ userPW = textBox2->Text;
char ACc[300];
char PWc[300];

[Code] ....

I built it and it is a success but when i run it, it have error: Debug Assertion Failed!

Program:....
File:....Microsoft Visual Studio 10.0VCincludexstring
Line: 930

Expression: invalid null pointer
.......

What is going wrong so i try to comment some part to debug. I found that it come form the code

string AC(ACc);
string PW(PWc);
String ^ ACstr;
String ^ PWstr;
MarshalString(ACstr,AC);
MarshalString(PWstr,PW);

I tried to use std::string and System::string when getting data from .dat but it failed so i tried char array.

View 2 Replies View Related

C++ :: Login System And Simple Menu With 3 Options

Oct 16, 2013

I need a program that has a login system and then a menu that has 3 options: Add, delete and exit. If I choose Add it wil ask for certain data of 5 students.

Then after registering the 5 students, another menu with the options: Search, Delete and exit. In search it will ask for an ID and then prints all the data of a single student. Delete gives me the option to delete the data of any user I choose.

View 1 Replies View Related

C++ :: Add Delete Verify And Print Users In Login System?

May 7, 2013

how to add delete verify and print users in a login system.

View 8 Replies View Related

C++ :: How To Separate Login For Admin And User

Feb 2, 2014

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] ....

View 1 Replies View Related

C/C++ :: How To Separate Login For Admin And User

Feb 2, 2014

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] ....

View 2 Replies View Related

C/C++ :: Program To Make User Login And Registration Using Textfiles?

Nov 21, 2014

why it doesn't enable to register except one time

View 1 Replies View Related

Visual C++ :: Out Of Memory And Driver Could Not Be Loaded Due To System Error 8

Jan 21, 2013

I am getting "driver could not be loaded due to system error 8" error while connecting to SQL Server 2005 from VC++. Its also throwing out of memory error. Basically i am developing and ISAPI dll. I use the following code to connect to DB.

CDatabase DBConnection;
if(! DBConnection.IsOpen()) {
DBConnection.OpenEx("Driver={SQL Server};Server=10.120.110.30;Database=Test;Trusted_Connection=yes;", CDatabase:penReadOnly | CDatabase::noOdbcDialog);

[Code] .....

for CDatabaseConnection, i can see 2 different method to open the connection, OpenEx and Open. Whats the difference between OpenEx and Open?

View 7 Replies View Related

C Sharp :: File Based User And Password System?

Feb 14, 2013

i can't seem to get my program to save the Set.savv file and encrypt it and decrypt it when user logs back on to there virtual file on a CD and writing it to the disk its self and closing the session

View 8 Replies View Related

C++ :: Customer Account Banking System Error With Variable Input

Sep 30, 2014

Im building a banking system. in my create_account it asks for account address and phone number as well as other questions. When I go to my Show account info (balance inquiry) I notice its not getting the right address as well as phone number. its showing "garbage".

Code:
/********************************************************************
* Vincent Dotts 09/29/2014 ch11.cpp *
* This program serves as a customer banking system *
*****************************HISTORY*********************************
* WHO DATE Discription *
*********************************************************************
* VD 09/30/2013 Created program *
********************************************************************/
#include<iostream>
#include<fstream>

[Code] .....

View 3 Replies View Related

C/C++ :: Calculator - Correcting For User Error

Jan 19, 2014

I have am having a bit of trouble with a baisc calculator that I am writing for my intro to programming class at Uni. We are using the C programming language. The program is supposed to be able to add, subtract, multiply, and divide. It is also supposed to return certain messages if an error has occurred. This is how the program is supposed to perform:

bash-4.2$ ./calc
enter expression: 4.25 * 3.3
result: 14.025

[Code]....

View 5 Replies View Related

C :: Unscramble User Input - Error In Loop

Sep 24, 2014

The purpose of this program is to unscramble the user's input. for example if the user entered 'ftooabll' the program would print 'football'. find the error that I am making....

Now, this only works for strings that are contained in the file wordlist. That being said, I would like this to repeat this search multiple times. Currently, the process is being repeated 7 times, but it only works on the first iteration. The code and sample input/output is below.

Code:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define NUMLOOP 6
void sort_string(char*);

[Code] ....

Sample input/output: (note: all data has been verified to be in the wordlist)

Enter string:
4132dcba
abcd1234
Enter string:
4132dcba
Enter string:
4132dcba
Enter string:
4132dcba
Enter string:
4132dcba
Enter string:
4132dcba
Enter string:
4132dcba

View 3 Replies View Related

C :: Error Displaying All Info Entered By User

Mar 4, 2013

Code:

#include<stdio.h>
main() {
int item_code, quantity;
char ans, y;

[Code] ....

View 4 Replies View Related

C :: Give Error Message If User Inputs Wrong

Nov 2, 2013

Code:

#include<stdio.h>
void main
{
int i;
int marks[10];
}

[code]....

how to give error and ask user to re enter if user enter other then a number?

View 6 Replies View Related

C++ :: How To Error Check If User Input Is Letters And Not Numbers

Jun 9, 2014

How do I error check if the user is inputting letters and not numbers? For example, if the user inputs "Lab.txt" I need to display an error message. If they input "Lab2part2.txt" then this is correct and what I want.

I've found a lot of information online on how to error check for numbers or a single letter (EX: 1,2,3, etc. or 'A' 'B' 'C') but nothing for actual WORDS or maybe I should refer to it as a string of characters?

Is there any way to do this? Because my program requires I ask the user to input the name of the file. But the way my code is currently set up is even when the user inputs the wrong file name it still opens the file. I want to prevent this from happening so my thought was to error check user input.

/*Program to determine company's weekly payroll*/

#include <iostream>
#include <string>
#include <fstream>
using namespace std;
void OpenTheFile() {
ifstream inputFile;
string filename;
char letter;
int number;

[Code] .....

View 1 Replies View Related

C++ :: How To Create Login ID And Password

May 30, 2014

"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]...

View 1 Replies View Related

C++ :: Login With TXT Writing / Reading

Oct 28, 2013

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..."?

View 1 Replies View Related

C++ :: Output Vowel From User Input - Error With Strings And Functions

Nov 25, 2014

The program is supposed to read in a string from the user and then output the number of each vowel that the string has. My first function is initializing the vectors, and the one that I'm having trouble with is the function used to read the string from the user and save it.

Here's my code:

#include <cstdlib>
#include <iostream>
#include <iomanip>
#include <string>
#include <vector>
using namespace std;

// FUNCTION PROTOTYPES GO HERE:
void init_vectors(vector<char> & vowels, vector<int> & frequencies);
string read_text(const string & prompt);

[Code] ....

And I'm getting the error:

freq.cpp: In function ‘std::string read_text(const std::string&)’:
freq.cpp:74: error: no matching function for call to ‘getline(std::istream&, const std::basic_string<char, std::char_traits<char>, std::allocator<char> >&)’

I'm not too sure if I can't use the function getline here or if there is something wrong with the function prototype itself but I'm pretty sure there isn't an error there as it was given to me.

View 4 Replies View Related

C++ :: Creating Login (username And Password)

Oct 6, 2014

I am trying to create a login that accepts a user login and password. it should accept 3 tries in which when the user enters their username the system should tell whether if the username is correct if not it should display a message saying invalid username and directs the user to register like entering their dob and name. But I cannot seem to get this part run correctly.

#include<stdio.h>
#include<conio.h>
#include<stdlib.h>
#include<string.h>
void main() {
char userId[10];
char passwrd[10];
int p = 0;

[Code] .....

View 18 Replies View Related

C# :: Create Account And Login To Windows?

Mar 18, 2014

I want to create user account and login to windows. I have to read username from DB and create window user for login to window. So,Can I create windows account and login to windows with C#

View 8 Replies View Related

C++ :: If Statement Error - Match Text Variable That User Has Entered With Another Got From Array

Dec 3, 2014

I have an if statement that should either match a text variable that the user has entered and a another text variable that has been got from an array but they won't match even if they are the same,Im at a lost with it.

void displayQuestion(int noQuestion, string questionArray[], string answerarray[], string answer, double scorearray, double finalscore){

cout << questionArray[noQuestion] << endl;
cout << "enter an answer " << endl;
cin >> answer;

[Code] ....

View 1 Replies View Related

C++ :: If User Inputs Letters / Words Instead Of A Number Give Error Message

Jan 11, 2014

I have created an error message if the user inputs the wrong selection number

if (choices < 1 || choices > 5)
{
cout << "
Please Enter a number between 1-5
";
}

How would i create a error message if the user inputs letters/words instead of a number.

View 5 Replies View Related

C++ :: How To Read / Edit CSV File And Continue From Last Login

May 5, 2014

I am working on a program that will do several mathematical calculation and will store the data into a csv file.The one below is just a prototype version of this.In my program,I will store my csv file as (current-date).csv using time.

With this in mind,I want my program to first check does (current-date).csv already exists.If not,the program runs normally and output all the data into the csv file.

However if (current-date).csv already exists,I want my program to read and edit that particular csv file,by skipping part1 in my code(name,id N etc.) and start with prompting the user for numbers straight-away.

In other words, if (current-date).csv already exists,the user should continue outputting the numbers from where the user last left before last termination instead of outputting the name,date & etc into the csv file again.

Eg: if no=22, continue inputting values from no=23 till terminating the program again and storing the values correctly into the csv file.

#include <iostream>
#include <fstream>
#include <iomanip>
#include <locale>
#include <string>
#include <sstream>
#include <time.h>

using namespace std;
// Program to read date N store it as currentdate.csv

[Code] ....

View 6 Replies View Related

C++ :: How To Login A Website And Download / Upload Files

Dec 18, 2014

Basicly I want to make a c++ program which does the following:

1- logs in to 4shared.com with username 'user_example' and password 'password_example'.
2- uploads to the 4shared account a file named 'test_upload.txt' located in 'C: est'
3- downloads a file named 'test_download.txt' from the 4sared account

I user curl 7.39.0 and curlpp 0.7.3

1- how to keep the same session between successive http requests
2- how to make an http request to upload a file
3- how to get the url of a file with specified name on a 4shared account

View 15 Replies View Related

C++ :: User Input Data About Percentages To Calculate Final Grade - Addition Error?

Sep 15, 2014

I am trying to code a program that takes in user inputted data about percentages and using it to later on calculate a final grade. 4 percents are inputted, for Assignments, Midterm1, Midterm2, and Finals. If the percents dont add up to 1 (i tell the user to enter the decimal value) I set up and if statement to catch it and end the program. Except that if i type in

Assignments = .3
Midterm1 = .3
Midterm2 = .3
Finals = .1

the program doesn't recognize that they add up to 1. Heres the relevant portion of my code [URL] ....

Here's some examples of how it works [URL] ....

And heres what i dont understand [URL] ....

Why is it saying .3 + .3 + .3 + .1 != 1 when .1 + .3 + .3 + .3 == 1?

View 1 Replies View Related

C# :: HttpWebRequest Redirects Back To Login Redirect Page?

Apr 22, 2014

What I am trying to do is to scrape data from a secure site. Don't worry, it is not for nefarious purposes. It's for a game I play, I am part of a team and within the site we have team data that we would like to share amongst each other( and store for future reference) without having to manually copy and paste. My goal is to create a web page that one would use to input their game credentials that would then connect to and retrieve game data from the game web site.

Here are the three main types of pages that I am dealing with and how they operate:

-There is a main login page. Although I am not accessing it via code. I may need to in the future.

-There is a Login redirect page. When I attempt to access a secure page, if I am not currently logged into the site, this page is displayed and allows me to type in the username and password.

-Lastly, there are Data pages - once you are logged into the site, you have access to a series of pages that contain game related data (these are the pages I want to scrape)

Something to note:

I have used LiveHTTPHeaders to capture the string that is added to the URL, which shows up like this:

"textLogin=username&textPassword=password&token=xxxxxx&Logon=Login&LogonFake=Login";

I am unsure if I have to mimic this or if by using the cookie within the HttpWebRequest, it will do this for me. The token is a fairly long string of characters that I unsure where it comes from. It doesn't match anything in the cookie. If I build the URL manually with the webpage location combined with the string from above and put it in the address bar of a browser - it goes directly to the desired page (logging me into the site behind the scenes)

Here is what I coded so far without any success:

public void TestConnection() {
//Build the connection string
ASCIIEncoding encoding = new ASCIIEncoding();
string postData = "textLogin=" + txtUsername.Text + "&textPassword=" + txtPassword.Text;
byte[] data = encoding.GetBytes(postData);

[code]....

When it gets to the end of the procedure shown above, the string HTML is of the LoginRedirect page and not the desired Data page. I am uncertain why it isn't logging into the correct page.

View 5 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved