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


ADVERTISEMENT

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++ :: 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 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

C++ :: Create User Defined Class And Have Access In Separate Header File From Main

Mar 15, 2013

I am a beginner with C++, taking a class right now. The lab this week is to create a user defined class and have it accesses in a separate .h header file from the main.

I think I'm finding my way through it, but I'm getting a complie error that makes no sense to me:

1> Resistor.cpp
1>c:users omdocumentsschoolcomp 220week 2lablab 2.2lab 2.2
esistor.h(11): error C2146: syntax error : missing ';' before identifier 'resistor'
1>c:users omdocumentsschoolcomp 220week 2lablab 2.2lab 2.2

[Code] .....

Here is the first portion of the .h file:

#include <iostream>
#include <iomanip>
#include <Windows.h>
#include <math.h>
#include <string>

class CResistor{
double res1, res2, res3, percentage, Nominal, Tolerance;

[Code] ....

View 16 Replies View Related

C++ :: Class Admin - Array Of Objects

Jun 26, 2013

What I want to do is have an admin class which will hold all the employee objects, can add them, list and calculate salaries. I'm trying to make array of objects, not sure if it's right

here is the code

Code: #include <iostream>
#include <string>
using namespace std;

class Employee {
public:
Employee(string name, short type, int salary)

[Code] .....

View 2 Replies View Related

Visual C++ :: How To Tell If Drive Is BitLocker Encrypted Without Admin Privilege

May 24, 2014

For my purpose all I need to know is drive's BitLocker encryption status by its DOS path. Something like this:

Code:
enum DriveEncryptionStatus{
Unprotected,
Protected,
Unknown
};
DriveEncryptionStatus = GetDriveBitlockerEncryptionStatus(L"C:");

I was able to find the Win32_EncryptableVolume class that unfortunately comes with this caveat:

To use the Win32_EncryptableVolume methods, the following conditions must be met:

You must have administrator privileges.

How to do this without running as an administrator?

View 4 Replies View Related

Visual C++ :: Running / Debugging Console App That Needs Admin Privileges

Nov 4, 2012

I see there's something called a manifest file but VS C++ EXPRESS seems different than non-express. The solutions I've seen show applets/tabs that I don't have in Express.

In one of my physical DEBUG folders are some .manifest. files and some a .res and .rc file.

I know you need to edit the XML and change asInvoker to requiredAdministrator (or something like that).

The confusing part is if I go into Project Properties, MANIFEST TOOL caret/tree, under INPUT AND OUTPUT, it shows this .manifest file is OUTPUT. It's as if it rewrites it every time with some defaults? I have edited it, but I see it's back to asInvoker. There is a spot to put in a ADDITIONAL manifest file (or .res file).

Does a manifest somehow affect the physical .exe file (something is imbedded in it??)?

How do I change my project to make sure that the .exe always runs as Admin? Will doing this ALSO allow me to DEBUG it in VS C++ EXPRESS without having to do anything different (play with manifest or run VS outright with Admin level)?

View 2 Replies View Related

C++ :: Get Scores From Admin And Sort Them Ascending Then Show Middle Score

Nov 23, 2013

I program a software to get scores from admin and sort them ascending then show the middle score(if admin enter middle).but when i compile it nothing happen.what should i do?here's code ,i use dev compiler

Code:
#include <cstdlib>
#include <iostream>
#include <math.h>
#include <string.h>
using namespace std;
int main(int argc, char *argv[]) {
int counter,j,count,counter2,m;

[Code] ....

View 14 Replies View Related

Visual C++ :: Writing To Named Pipe Coming From A Service (session 0) Without Admin Rights

Dec 9, 2014

I'm trying to write to a named pipe created by a service, as we all know the session 0 isolation implemented in vista and forward makes this task a bit complicated.

well at this point i managed to make almost all to work but my real problem comes when i try to write on the named pipe from my GUI application with no administrator rights

If i run the GUI application with admin rights it works 100% but, I don't need that application to require the user admin rights and for security reasons i rather to leave it without admin...

so i started my research and i found that there is a way to achieve this by calling CreateNamedPipe() with a low integrity security attributes...

well how to implement but i finally made it, the problem is that it gets worse than passing null security attributes, it works with admin rights with NULL security attributes, but when i pass the low integrity security attributes it gives "access denied" even when using admin rights, so i guess im passing the wrong security attributes but how to manually create the security descriptor string.

This is the code:

Service (session0) SERVER

Code:
DWORD WINAPI PipeThreadRSVS(void* pParameter){
LPTSTR _PIPE_NAME = "\.pipeRSVHPipeIn";
bool Break=false;
char Received_Buffer[BlockSize+16];
DWORD BytesRead = 0;

[Code] ....

View 2 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++ :: 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++ :: 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++ :: 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++ :: 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++ :: 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# :: 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

C# :: How To Set Login And Logout Time In Window Form Application

Apr 6, 2015

using System;
using System.Collections.Generic;
using System.Linq;
using System.Security;
using System.Security.Principal;
using System.Text;
using System.Threading;
namespace WindowsPrincipalTrial {
public class Program

[Code] ....

View 2 Replies View Related

C Sharp :: Crystal Reports - Database Login Prompt

Oct 5, 2012

The report works in my computer. But when I deploy to another computer, it doesn't work. It got login in prompt. I used SqlClient to get data then bind to DataSet, then set report source.

My environment: XP + VS 2003
DataBase : MS SQL 2005 (another server)
System : Windows Form

Client PC : XP

View 1 Replies View Related

C/C++ :: Login Program That Reads Username And Password From Text File

Feb 14, 2015

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

View 5 Replies View Related

Visual C++ :: Automatic Login / Password Into Web Page Using Details Fully Automated

Feb 9, 2015

I Want to login this webpage automatically using vbs or any other javascript

I want to login into this [URL] .... web page and book the tickets for me by automatically.

Requirements into the site as given below as mentioned in order

Login with Login Details

Captcha Will be there, for that assume manually entered.

Then select particular event, pick the date and again check the event, select the number of persons, click on submit button.

Fill the Persons details and photo.

Check the button of I read the terms and conditions.

Click on the submit button

All these should be done within the small time.

View 2 Replies View Related

Visual C++ :: Program To Auto Login Website - Waiting With Message Loop

Aug 25, 2013

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

View 4 Replies View Related

C :: Make A Separate Function

May 6, 2013

I will post the entire code at the bottom. Its running fine right now but This part in the menu function I need to make as a separate function. My problem is when I make it into a function by itself I have to declare and initialize the grades A,B,C,D,F how can I do that when I can't make them equal 0 because it has to keep track of how many of each letter grade.

Code:

//Count letter grade
if(ave >= 90)
++A;
else if (ave >= 80)
++B;
else if (ave >= 70)
++C;
else if (ave >= 60)
++D;
}

[code]....

View 3 Replies View Related







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