Anonymous
Mat
thx
No problem 😊
Anonymous
Guys what do you think if hacking is based on programming language or not?
🥑
🥑
on binary
Anonymous
I know but how
🥑
hackers pick the right numbers from binary code
Anonymous
please tell the mistake here...since I'm a newbee
Berkus
please tell the mistake here...since I'm a newbee
one mistake is that "Lenngth" is spelled with a single n
Berkus
please tell the mistake here...since I'm a newbee
you don't check that lenght is even (error: not validating user input)
Berkus
please tell the mistake here...since I'm a newbee
you don't initialize the loop variable i - it contains garbage
Berkus
please tell the mistake here...since I'm a newbee
you use gotos (which results in an endless loop btw)
Anonymous
so what should I do
Berkus
please tell the mistake here...since I'm a newbee
you don't sort the strings as the requirements ask you to
Berkus
so what should I do
best action would be to fix the program
Anonymous
Guys binary to decimal and vice versa in C++ Who can?
Anonymous
thanks a lot "Berkus Decker " I got the output
Anonymous
it's not hard, you can do it
What about string to binary?
Berkus
What about string to binary?
string of what exactly
Anonymous
Any text
Berkus
what do you expect to see?
Anonymous
Nothing except to increase the skill
Berkus
if you expect to see nothing then cout << endl; will do
Anonymous
Yeah i know) thanks
Berkus
ok then
Anonymous
hi #include <iostream> using namespace std; int main() { int i,count=0; string s; char a[100]; getline(cin,s); int b=s.size(); for(i=0;i<b;i++) { if(s[i]==' ') { count++; i++; } a[count]+=s[i]; } for(i=0;i<=count;i++) cout<<a[i]; return 0; } the program is about getting a line from user and spliiting it into word by word and displaying ..the program is not working properly anybody help me
Berkus
Not exactly what the stated goal is
Francesco
hi #include <iostream> using namespace std; int main() { int i,count=0; string s; char a[100]; getline(cin,s); int b=s.size(); for(i=0;i<b;i++) { if(s[i]==' ') { count++; i++; } a[count]+=s[i]; } for(i=0;i<=count;i++) cout<<a[i]; return 0; } the program is about getting a line from user and spliiting it into word by word and displaying ..the program is not working properly anybody help me
#include <iostream> #include <vector> using namespace std; int main() { int i=0,count=0; string s; vector<string> w(1); getline(cin,s); for(i=0;i<s.size();i++){ if(s[i]==' '){ count++; w.push_back(""); } else w[count].insert(w[count].end(),1,s[i]); } for(string i:w) cout<<i<<endl; return 0; }
Francesco
if i have understood correctly
Anonymous
thanks for all the answer
Anonymous
now i feel like i dont know anything😐
Anonymous
thanks
Anonymous
ill ask
Francesco
Btw i don't change very much of your code, i add only a vector instead a char array. If you want a more quick solution use strtok
Francesco
http://www.cplusplus.com/reference/cstring/strtok/
AndrEEa
Bekzod Eliboyev
MySql with Netbeans how connected? Please replying me...!
Bekzod Eliboyev
Ravi
Roxifλsz 🇱🇹
MySql with Netbeans how connected? Please replying me...!
Netbeans is an IDE, if what you meant ask for how to use mysql in your code, then you should look at the documentation of mysql
Roxifλsz 🇱🇹
https://dev.mysql.com/doc/
Roxifλsz 🇱🇹
Thank you very much! !
No need, and next time use google - it can answer most questions very well and will save you some time
Berkus
google to stackoverflow!
Roxifλsz 🇱🇹
google to stackoverflow!
Yes, stackoverflow is also a good source of answers for programming
Anonymous
Programming language https://drive.google.com/drive/folders/0ByWO0aO1eI_MN1BEd3VNRUZENkU Books https://drive.google.com/drive/folders/0B0hgUX3me1_RNi1KTXBzXzdXSzA hacking ebook collection https://drive.google.com/drive/folders/0B-JzQsKoJaANbTFGN0RWLWhONms Books https://drive.google.com/drive/folders/0B09qtt10aqV1SGxRVXBWYmNIS2M Books https://drive.google.com/drive/folders/0B1v9Iy1jH3FXdlNDeUNHNEVsZlE Books https://drive.google.com/drive/folders/0B1Ef5shqGHDNRGEwd3BYb0N3Um8 C programming tutorial https://drive.google.com/drive/folders/0B1qoi1IlEKwaM2tSMFBmOGUyNzg Udemy course https://drive.google.com/drive/folders/0B1HQDi7EkA9XNlR3STF5SVJIVUk Programming books https://drive.google.com/drive/folders/0B2iEK7PB5AR-b01obXBHWHVHQzg Linux books https://drive.google.com/drive/folders/0B1Wzf8eTK3LTYWtqOGlnQldTV2c Books https://drive.google.com/drive/folders/0B_qpgvDTe8kraTQ2QkM2S19tQWs Books https://drive.google.com/drive/folders/0B4PtWlBoZ1rVSncxbi1JVFY4anM https://drive.google.com/drive/folders/0B3Qd1rlyIyR5bHo0dENpM1lSclk Banking exam preparation papers https://drive.google.com/drive/folders/0B079Cm0MfQeyS3R5cHVnb2RVUU0 Learning awareness banking https://drive.google.com/drive/folders/0B8CnCCd60bnzM3VSWFhKZ2Rzc2s Head first programming book collection https://drive.google.com/drive/folders/0B1W3DeV5S5BELXZRajkteW83WHM IBPS book collection for banking https://drive.google.com/drive/folders/0B4xFnW1qvXXgZnVkaUVEX2w4Zzg Reading material https://drive.google.com/drive/folders/0Bx_3I5qjqu3rSVBWMHpjLVRoREE 300 medical books https://drive.google.com/drive/folders/0BzQUrkcZOjAiYmQ0NTBjZmMtMDJjMS00OWViLTk0NWEtYTFhYzE2ZTZmYzdk Udemy the complete digital marketing course https://drive.google.com/drive/folders/0B-M90IqpPfRHNXZ6SkdMQlZOUkk Arduino https://drive.google.com/drive/folders/0B0TIoKgqQ9p5WC1pV2I0aHlKamc All type books https://drive.google.com/drive/folders/0B1dv5sqSPsPbfk1ZSXNud1pvWl9BV2Franh2ZFl0S0hweTBhT3QyNFUxWGgzQkFpOGUtd0k Mechanical engineering books https://drive.google.com/drive/folders/0B1k2RCDnejGvNFZWTWhJeDctWDQ Study books https://drive.google.com/drive/folders/0B6hG9OOiP0g2Zkh4M2x3WnVJNWs @udemyfree4u English https://drive.google.com/drive/folders/0B5xOSW6DBC5LfkVZWTJqYUZOblgyQnlhSlc2U1RJWUFyWjBnUXc0dHlrTHR5dEUySXNYc0E English grammer https://drive.google.com/drive/folders/0B1_NUA4_UggJYUIwc09LX1dfcDA GMAT, GRE, TOEFL, IELTS & LSAT - https://drive.google.com/drive/folders/0B2jZERjUXCHhZnB5T0tpY2ZyRmc Html essential training https://drive.google.com/drive/folders/0B3LfaGUUk6tiT18xZDRBY1FCVXc Lynda courses https://drive.google.com/drive/folders/0B5eJ2fw2iba1UlZna0FUWXF4UFU Mathematics https://drive.google.com/drive/folders/0BzeyVSBfx9yaWUMtUXZNLU9kM0k Php https://drive.google.com/drive/folders/0ByWO0aO1eI_MV0lhX1dkUlQ3YUk Programming books https://drive.google.com/drive/folders/0B2iEK7PB5AR-b01obXBHWHVHQzg Share if u care 😘 @udemyfree4u
Anonymous
thank you admin pin this plz
Anonymous
Hi I have written a sample c++ to access berkely database. Included db_cxx.h header in the file. But i am getting following error.
Anonymous
error
Anonymous
can any one plz help?
Anonymous
I think i have to define the db class also..right?
Anonymous
Programming language https://drive.google.com/drive/folders/0ByWO0aO1eI_MN1BEd3VNRUZENkU Books https://drive.google.com/drive/folders/0B0hgUX3me1_RNi1KTXBzXzdXSzA hacking ebook collection https://drive.google.com/drive/folders/0B-JzQsKoJaANbTFGN0RWLWhONms Books https://drive.google.com/drive/folders/0B09qtt10aqV1SGxRVXBWYmNIS2M Books https://drive.google.com/drive/folders/0B1v9Iy1jH3FXdlNDeUNHNEVsZlE Books https://drive.google.com/drive/folders/0B1Ef5shqGHDNRGEwd3BYb0N3Um8 C programming tutorial https://drive.google.com/drive/folders/0B1qoi1IlEKwaM2tSMFBmOGUyNzg Udemy course https://drive.google.com/drive/folders/0B1HQDi7EkA9XNlR3STF5SVJIVUk Programming books https://drive.google.com/drive/folders/0B2iEK7PB5AR-b01obXBHWHVHQzg Linux books https://drive.google.com/drive/folders/0B1Wzf8eTK3LTYWtqOGlnQldTV2c Books https://drive.google.com/drive/folders/0B_qpgvDTe8kraTQ2QkM2S19tQWs Books https://drive.google.com/drive/folders/0B4PtWlBoZ1rVSncxbi1JVFY4anM https://drive.google.com/drive/folders/0B3Qd1rlyIyR5bHo0dENpM1lSclk Banking exam preparation papers https://drive.google.com/drive/folders/0B079Cm0MfQeyS3R5cHVnb2RVUU0 Learning awareness banking https://drive.google.com/drive/folders/0B8CnCCd60bnzM3VSWFhKZ2Rzc2s Head first programming book collection https://drive.google.com/drive/folders/0B1W3DeV5S5BELXZRajkteW83WHM IBPS book collection for banking https://drive.google.com/drive/folders/0B4xFnW1qvXXgZnVkaUVEX2w4Zzg Reading material https://drive.google.com/drive/folders/0Bx_3I5qjqu3rSVBWMHpjLVRoREE 300 medical books https://drive.google.com/drive/folders/0BzQUrkcZOjAiYmQ0NTBjZmMtMDJjMS00OWViLTk0NWEtYTFhYzE2ZTZmYzdk Udemy the complete digital marketing course https://drive.google.com/drive/folders/0B-M90IqpPfRHNXZ6SkdMQlZOUkk Arduino https://drive.google.com/drive/folders/0B0TIoKgqQ9p5WC1pV2I0aHlKamc All type books https://drive.google.com/drive/folders/0B1dv5sqSPsPbfk1ZSXNud1pvWl9BV2Franh2ZFl0S0hweTBhT3QyNFUxWGgzQkFpOGUtd0k Mechanical engineering books https://drive.google.com/drive/folders/0B1k2RCDnejGvNFZWTWhJeDctWDQ Study books https://drive.google.com/drive/folders/0B6hG9OOiP0g2Zkh4M2x3WnVJNWs @udemyfree4u English https://drive.google.com/drive/folders/0B5xOSW6DBC5LfkVZWTJqYUZOblgyQnlhSlc2U1RJWUFyWjBnUXc0dHlrTHR5dEUySXNYc0E English grammer https://drive.google.com/drive/folders/0B1_NUA4_UggJYUIwc09LX1dfcDA GMAT, GRE, TOEFL, IELTS & LSAT - https://drive.google.com/drive/folders/0B2jZERjUXCHhZnB5T0tpY2ZyRmc Html essential training https://drive.google.com/drive/folders/0B3LfaGUUk6tiT18xZDRBY1FCVXc Lynda courses https://drive.google.com/drive/folders/0B5eJ2fw2iba1UlZna0FUWXF4UFU Mathematics https://drive.google.com/drive/folders/0BzeyVSBfx9yaWUMtUXZNLU9kM0k Php https://drive.google.com/drive/folders/0ByWO0aO1eI_MV0lhX1dkUlQ3YUk Programming books https://drive.google.com/drive/folders/0B2iEK7PB5AR-b01obXBHWHVHQzg Share if u care 😘 @udemyfree4u
Thank you
Anonymous
can any one plz help?
I think you have to link file or similar
Anonymous
sudo apt-get install libdb++-dev
Anonymous
Anonymous
Ok.i will check the command.thank you
Anonymous
installed libdb++-dev and compiled the program once agin. still i have same issue.
Liam
link file means?
Compile source files, you get object files. Link object files, you get static/dynamic libraries or executable files. (preprocessing and assembly are ignored in this explaination.) When you execute g++ foo.cpp, the tool chain helps you to compile and then link. However, after the success of compilling, ld, the linker, reports the symbol undefined error. This is because that in your source file, you request some functions or variables that are defined in other libraries, but you failed to link them together. As stated by Mester, you have to get the libraries (by sudo apt-get install bar), and then explicitly link them with your object file(s) (by -lbar). Google is your friend.
Anonymous
Thank you Liam ,for information. I will try as you said.
Anonymous
Hi Liam, Have a doubt.Once compiled the sourcefile we will get object file.I am not able to create the object file ,because while compiling i am getting the error. Then how can i explicitly link the libraries with object file using -lbar?
Liam
Hi Liam, Have a doubt.Once compiled the sourcefile we will get object file.I am not able to create the object file ,because while compiling i am getting the error. Then how can i explicitly link the libraries with object file using -lbar?
The errors you pasted above are not compilling errors, they are linking errors. As stated above, when you are running g++ foo.cpp, the tool chain (g++) will do preprocessing, compilling, assembly and linking for you. That is, g++ is an all-in-one command. For linking a library named bar, just give the flag -lbar to g++.
Anonymous
Ok.
Liam
`man g++` gives you the documentation. In the section Linker Options, you'll find this.
Anonymous
Ok.
Liam
Since C++17 was released, the draft of C++20 is undertaking. lol
Compilation
Hello everyone Can anyone help me in solving the following question using c++
Anonymous
Sure
Compilation
Compilation
I tried to solve it by checking the sum of each row and each column
Compilation
I included an if condition to reject a solution where all the input is just 5
Compilation
Compilation
Compilation
Im a beginner and would welcome any correction Thanks
Anton
Where you find this problem?
Anonymous
Im a beginner and would welcome any correction Thanks
#include <iostream> #include <set> int main() { //decl std::set<int> row[9]; std::set<int> column[9]; std::set<int> box[9]; //read & store for (int i = 0; i < 9; ++i) { for (int j = 0; j < 9; ++j) { int val; std::cin >> val; if ((val >= 1) && (val <= 9)) { row[i].insert(val); column[j].insert(val); int k = j / 3 + i / 3 + i / 3 + i / 3; box[k].insert(val); } } } //check bool l = true; int i = 0; while (l && i < 9) { l = row[i].size() == 9; ++i; } if (!l) std::cout << "NO" << std::endl; else { bool l = true; int i = 0; while (l && i < 9) { l = column[i].size() == 9; ++i; } if (!l) std::cout << "NO" << std::endl; else { bool l = true; int i = 0; while (l && i < 9) { l = box[i].size() == 9; ++i; } if (!l) std::cout << "NO" << std::endl; else std::cout << "YES" << std::endl; } } return 0;