Click here to Skip to main content
15,892,005 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Strange Syntax Pin
Richard Andrew x6413-Aug-14 2:24
professionalRichard Andrew x6413-Aug-14 2:24 
GeneralRe: Strange Syntax Pin
CPallini13-Aug-14 2:27
mveCPallini13-Aug-14 2:27 
QuestionHow to store objects(Object properites) in a file with c++ native codes? Pin
shaktikanta12-Aug-14 1:36
shaktikanta12-Aug-14 1:36 
AnswerRe: How to store objects(Object properites) in a file with c++ native codes? Pin
Maximilien12-Aug-14 3:17
Maximilien12-Aug-14 3:17 
GeneralRe: How to store objects(Object properites) in a file with c++ native codes? Pin
Cristian Amarie14-Aug-14 22:08
Cristian Amarie14-Aug-14 22:08 
QuestionHow to setup toolbars (CMFCToolbar) for small and large icons with different DPI values ? Pin
Maximilien11-Aug-14 7:40
Maximilien11-Aug-14 7:40 
AnswerRe: How to setup toolbars (CMFCToolbar) for small and large icons with different DPI values ? Pin
Andrew Truckle2-Jan-20 0:15
professionalAndrew Truckle2-Jan-20 0:15 
QuestionC/C++ Pin
Member 1100457310-Aug-14 21:33
Member 1100457310-Aug-14 21:33 
Respected Sir Please Tell me logical error in this code because i faced many difficulties in This Code, please solve this .

When i Execute the Code after Enter 1 Option it cannot get the name if it get the name the password field cannot execute.and more error in it like ,.

i want to get only 8 string/Number in Password but loop did not work correctly please answer me ASAP.
// student_Record_Management_C++_1.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include<iostream>
#include<fstream>
#include<string>
#include<stdlib.h>
#include<iomanip>
#include<stdio.h>
#include<conio.h>
using namespace std;
class Menu_Account
{
private:
int option,loop;
char name[20],pass[8],pass_1[8],color[10];
public:
void int_menu()
{
cout<<"\t\t\t-----------------------------------"<<endl;
cout<<"\t\t\t="" student="" management="" record="" system."<<endl;
="" cout<<"\t\t\t-----------------------------------"<<endl<<endl;
="" cout<<endl<<endl;
="" cout<<"\t\t\t-------------------------------"<<endl;
="" enter="" login="" id="" &="" password"<<endl;
="" cout<<"\t\t\t-------------------------------"<<endl<<endl;
="" cout<<"\t\t\t1:cretae="" new="" account."<<endl;
="" cout<<"\t\t\t2:already="" have="" accoutn."<<endl;
="" cout<<"\t\t\t3:exit."<<endl<<endl<<endl;
="" xyz:
="" cout<<"\t\t\tenter="" option:";
="" cin="">>option;
cout<<endl;
switch(option)
="" {
="" case="" 1:
="" return="" account_create();
="" break;
="" 2:
="" void="" login_id();
="" 3:
="" exit(0);
="" default:
="" cout<<"enter="" right="" input"<<endl;
="" goto="" xyz;
="" }

="" }
="" account_create()
="" system("cls");
="" cout<<"\t\t\t-----------------------------------"<<endl;
="" cout<<"\t\t\t="" student="" management="" record="" system."<<endl;
="" cout<<"\t\t\t-----------------------------------"<<endl<<endl;
="" cout<<endl<<endl;
="" enter="" information="" for="" new="" account."<<endl;
="" cout<<"\n\t\t\tenter="" your="" name:";
="" cin.getline(name,20);
="" password:";
="" for(loop="0;loop<8;loop++)
" cin="">>pass[loop];
}
cout<<"\n\t\t\tRe-type Password:";
cin>>pass_1;
cout<<"\n\t\t\tWhat Is Your Favorite Color:";
cin.getline(color,10);
}

};

int _tmain(int argc, _TCHAR* argv[])
{
Menu_Account obj_1;
obj_1.int_menu();
char choice;
fstream in_file("Student.txt",ios::in|ios::app|ios::out);
do
{
obj_1.Account_Create();
in_file.write(reinterpret_cast<char *="">(&obj_1),sizeof(obj_1));
cout<<"\nDo You Want To Add More Data:";
cin>>choice;
}while(choice=='y'||choice =='Y'|| choice=='1');
in_file.close();
system("pause");
return 0;
}
AnswerRe: C/C++ Pin
Richard MacCutchan10-Aug-14 23:10
mveRichard MacCutchan10-Aug-14 23:10 
AnswerRe: C/C++ Pin
Satya Chamakuri11-Aug-14 2:05
Satya Chamakuri11-Aug-14 2:05 
GeneralRe: C/C++ Pin
Member 1100457311-Aug-14 4:08
Member 1100457311-Aug-14 4:08 
GeneralRe: C/C++ Pin
Richard MacCutchan11-Aug-14 5:17
mveRichard MacCutchan11-Aug-14 5:17 
SuggestionRe: C/C++ Pin
David Crow11-Aug-14 5:51
David Crow11-Aug-14 5:51 
AnswerRe: C/C++ Pin
Satya Chamakuri11-Aug-14 18:12
Satya Chamakuri11-Aug-14 18:12 
GeneralRe: C/C++ Pin
Member 1100457311-Aug-14 19:16
Member 1100457311-Aug-14 19:16 
AnswerRe: C/C++ Pin
Satya Chamakuri11-Aug-14 21:06
Satya Chamakuri11-Aug-14 21:06 
AnswerRe: C/C++ Pin
Cristian Amarie14-Aug-14 22:10
Cristian Amarie14-Aug-14 22:10 
GeneralCalculute average value of large array Pin
wayne wu9-Aug-14 14:55
wayne wu9-Aug-14 14:55 
AnswerRe: Calculute average value of large array Pin
Jochen Arndt9-Aug-14 21:41
professionalJochen Arndt9-Aug-14 21:41 
GeneralRe: Calculute average value of large array Pin
k505410-Aug-14 2:19
mvek505410-Aug-14 2:19 
AnswerRe: Calculute average value of large array Pin
David Crow11-Aug-14 5:54
David Crow11-Aug-14 5:54 
GeneralRe: Calculute average value of large array Pin
Stefan_Lang11-Aug-14 23:07
Stefan_Lang11-Aug-14 23:07 
QuestionApparently different behaviour assigning C string to std::string, for Relese/Debug Pin
piul8-Aug-14 4:36
piul8-Aug-14 4:36 
AnswerRe: Apparently different behaviour assigning C string to std::string, for Relese/Debug Pin
jeron18-Aug-14 5:00
jeron18-Aug-14 5:00 
GeneralRe: Apparently different behaviour assigning C string to std::string, for Relese/Debug Pin
piul10-Aug-14 21:39
piul10-Aug-14 21:39 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.