hello ,
i am starting to program my project in c++
i need help in direction.
my project is like wikpedia . i should enter about 30 value .
the search will be by pressing some value and then a list will open with all the value that it found. choice will happen by pressing a number (1-5) and there will be another botton (6) that will send to another page with more choices.
the user can typing a value and the pc will ask if it is the value he want if Y he will show the value
if N he will open the search window again.
pressing Y will enter the user to a window that show :
1. free search: a. the exect value.
b. at least 1 word.
2.serch by category .
3. random search the pc will found randomly value and then he will ask if the user want this value.Y will enterr N will cancel and go to the search again.
creat an account:
by fill in private details , USER NAME , passwor (6 numbers), question for restore the password
3 incorect pass typing will bring to an exit
there be an restore password option.
the value name will be bold and with color and the other txt will not.
how do i start this project?
what function do i need?
what liberias do i need?
any help will welcome!!
in this option the user that have an account can see a history of his search and for every search in his history there will be an exect date and hour that shows the date&hour that he saw the value
and he also can write some notes for his eyes only .
Yes. I can't understand what it is you want/need to create. Maybe re-write you OP or break down what you need to write and we'll help you step by step.
the computer ask the user what he want to do :
1- [L]og in for existing account
2 - [S]ign in
3 - stay [G]uest
if "1" a screen of log in will show USER NAME ; PASSWORD
if the pasdword that typin was incorrect a msg like "wrong password, try again" and then will back for the log in screen
the user will have 3 try the 4 wrong try he will out from the program.
an option of restore will have. by pressing [R]estor in the log in screen.
after log in an option that the user can see a history of his value search- by pressing [H]istory
if "2" a screen of sign in will show . question like : USER NAME , PASSWORD , RE-TYPING UR PASSWORD, QUESTION FOR RESTOR PASSWORD.
if "3" he will move for FIRST SEARCH ENGING[
FIRST SEARCH ENGINE :
the pc will ask the user what he want to do.
if he want search by value -press 1 .
in this choice he will ask again if he want to search by the exect search he will press -1
if by "at least 1 word" he will press 2.
if he will search someting but the pc wont found nothing he will right " no resault"
if the user will want to search by catagory he will press 2 :
and the he will see a list of the catagory : 1 - war. 2 - holiday .3 presidents. 4... 5... 6 . Next page
if pressing 6 he will see more options :
1 .... 2 .... 3.... 4... 5 . previous page.
pressing any number will open a list of all the values in this subject.
if he will want a random search he wiill press 3.
the computedr will scan all the values that exists and when he find a value he will ask if he want to read the value [Y]
if he dont wwant he press [N] and it will send him back to the first search screen
Well lets take one step at a time. How about trying to write everything before 'FIRST SEARCH ENGINE :'? Post your code when you're done.
Thats all simple enough to do in terms of understanding what you need to do, it just requires knowledge of many different parts of C++. In the nicest way possible, you have said that you want/need to do this but you don't know where to start... Is this beyond your capability?
i have lots of buging . what did i do wrong? what is the modal of SWITCH statment?
how can i do that when a user will connect he can see all of is search history ?
im sending the code .
That is the only advice I can offer you as if you're making mistakes here, you will definately make misakes later on. Please take some time in going through this tutorial, understanding and modifying the given examples.
im sorry for botter all of u . but, i must making it i have 2 weeks this is my final project . it's very important to me without it i will not get my diploma.
i have an error while running the code.
1>------ Build started: Project: search engine, Configuration: Debug Win32 ------
1>Compiling...
1>search engine.cpp
1>\search engine\search engine\search engine.cpp(7) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>f:\\search engine\search engine\search engine.cpp(13) : error C2065: 'log' : undeclared identifier
1>f:\search engine\search engine\search engine.cpp(13) : error C2050: switch expression not integral
1>f:\\search engine\search engine\search engine.cpp(15) : error C2065: 'L' : undeclared identifier
1>f:\קט\search engine\search engine\search engine.cpp(15) : error C2051: case expression not constant
1>f:יקט\search engine\search engine\search engine.cpp(18) : error C2679: binary '>>' : no operator found which takes a right-hand operand of type 'int [6]' (or there is no acceptable conversion)
1> c:\program files\microsoft visual studio 9.0\vc\include\istream(1144): could be 'std::basic_istream<_Elem,_Traits> &std::operator >><std::char_traits<char>>(std::basic_istream<_Elem,_Traits> &,signed char *)'
1> with
1> [
1> _Elem=char,
1> _Traits=std::char_traits<char>
1> ]
1> c:\program files\microsoft visual studio 9.0\vc\include\istream(1146): or 'std::basic_istream<_Elem,_Traits> &std::operator >><std::char_traits<char>>(std::basic_istream<_Elem,_Traits> &,signed char &)'
1> with
1> [
1> _Elem=char,
1> _Traits=std::char_traits<char>
1> ]
1> c:\program files\microsoft visual studio 9.0\vc\include\istream(1148): or 'std::basic_istream<_Elem,_Traits> &std::operator >><std::char_traits<char>>(std::basic_istream<_Elem,_Traits> &,unsigned char *)'
1> with
1> [
1> _Elem=char,
1> _Traits=std::char_traits<char>
1> ]
1> c:\program files\microsoft visual studio 9.0\vc\include\istream(1150): or 'std::basic_istream<_Elem,_Traits> &std::operator >><std::char_traits<char>>(std::basic_istream<_Elem,_Traits> &,unsigned char &)'
1> with
1> [
1> _Elem=char,
1> _Traits=std::char_traits<char>
1> ]
1> c:\program files\microsoft visual studio 9.0\vc\include\istream(155): or 'std::basic_istream<_Elem,_Traits> &std::basic_istream<_Elem,_Traits>::operator >>(std::basic_istream<_Elem,_Traits> &(__cdecl *)(std::basic_istream<_Elem,_Traits> &))'
1> with
1> [
1> _Elem=char,
1> _Traits=std::char_traits<char>
1> ]
1> c:\program files\microsoft visual studio 9.0\vc\include\istream(161): or 'std::basic_istream<_Elem,_Traits> &std::basic_istream<_Elem,_Traits>::operator >>(std::basic_ios<_Elem,_Traits> &(__cdecl *)(std::basic_ios<_Elem,_Traits> &))'
1> with
1> [
1> _Elem=char,
1> _Traits=std::char_traits<char>
1> ]
1> c:\program files\microsoft visual studio 9.0\vc\include\istream(168): or 'std::basic_istream<_Elem,_Traits> &std::basic_istream<_Elem,_Traits>::operator >>(std::ios_base &(__cdecl *)(std::ios_base &))'
1> with
1> [
1> _Elem=char,
1> _Traits=std::char_traits<char>
1> ]
1> c:\program files\microsoft visual studio 9.0\vc\include\istream(175): or 'std::basic_istream<_Elem,_Traits> &std::basic_istream<_Elem,_Traits>::operator >>(std::_Bool &)'
1> with
1> [
1> _Elem=char,
1> _Traits=std::char_traits<char>
1> ]
1> c:\program files\microsoft visual studio 9.0\vc\include\istream(194): or 'std::basic_istream<_Elem,_Traits> &std::basic_istream<_Elem,_Traits>::operator >>(short &)'
1> with
1> [
1> _Elem=char,
1> _Traits=std::char_traits<char>
1> ]
1> c:\program files\microsoft visual studio 9.0\vc\include\istream(228): or 'std::basic_istream<_Elem,_Traits> &std::basic_istream<_Elem,_Traits>::operator >>(unsigned short &)'
1> with
1> [
1> _Elem=char,
1> _Traits=std::char_traits<char>
1> ]
1> c:\program files\microsoft visual studio 9.0\vc\include\istream(247): or 'std::basic_istream<_Elem,_Traits> &std::basic_istream<_Elem,_Traits>::operator >>(int &)'
1> with
1> [
1> _Elem=char,
1> _Traits=std::char_traits<char>
1> ]
1> c:\program files\microsoft visual studio 9.0\vc\include\istream(273): or 'std::basic_istream<_Elem,_Traits> &std::basic_istream<_Elem,_Traits>::operator >>(unsigned int &)'
1> with
1> [
1> _Elem=char,
1> _Traits=std::char_traits<char>
1> ]
1> c:\program files\microsoft visual studio 9.0\vc\include\istream(291): or 'std::basic_istream<_Elem,_Traits> &std::basic_istream<_Elem,_Traits>::operator >>(long &)'
1> with
1> [
1> _Elem=char,
1> _Traits=std::char_traits<char>
1> ]
1> c:\program files\microsoft visual studio 9.0\vc\include\istream(309): or 'std::basic_istream<_Elem,_Traits> &std::basic_istream<_Elem,_Traits>::operator >>(__w64 unsigned long &)'
1> with
1> [
1> _Elem=char,
1> _Traits=std::char_traits<char>
1> ]
1> c:\program files\microsoft visual studio 9.0\vc\include\istream(329): or 'std::basic_istream<_Elem,_Traits> &std::basic_istream<_Elem,_Traits>::operator >>(__int64 &)'
1> with
1> [
1> _Elem=char,
1> _Traits=std::char_traits<char>
1> ]
1> c:\program files\microsoft visual studio 9.0\vc\include\istream(348): or 'std::basic_istream<_Elem,_Traits> &std::basic_istream<_Elem,_Traits>::operator >>(unsigned __int64 &)'
1> with
1> [
1> _Elem=char,
1> _Traits=std::char_traits<char>
1> ]
1> c:\program files\microsoft visual studio 9.0\vc\include\istream(367): or 'std::basic_istream<_Elem,_Traits> &std::basic_istream<_Elem,_Traits>::operator >>(float &)'
1> with
1> [
1> _Elem=char,
1> _Traits=std::char_traits<char>
1> ]
1> c:\program files\microsoft visual studio 9.0\vc\include\istream(386): >
STL strings are generally better style than c-style strings. C-style strings are antiquated and, although they do work, they introduce several issues into the mix (null termination, length limitations, etc) that are not present in standard strings. You can manipulate c-strings most effectively with the functions in the cstring library.