Anonymous
and the reference points to the same object
Anonymous
but with primitives, it doesn't work
Anonymous
the example made in the stack overflow thread doesn't work because it makes the copied reference point to the new object
Anonymous
but if you modify the object the reference was pointing to without changing what it points to within the method, it works
Anonymous
Anonymous
Help me to solve this
Álvaro
XDDDDDDDDDD IN C++?
Anonymous
This is physics
Anonymous
Lmao
Anonymous
Guys who is good at theory of languages?
Anonymous
Automata and stuff like that..
Anonymous
I think its gonna annoy u guys ..here is it
Anonymous
Anonymous
I d like to minimze this NFA
Anonymous
I went to various websites .and read about minimization
Anonymous
Except this automaton is burning my brain xD.anywat dont answer me if u are busy and thanks so much
Álvaro
NFA? n... finite automata
Anonymous
Michael thats what im dealing with everday xD i just had the course yesterday yet i forgot..im getting old whn im only 20
darshpreets
getiing error in data
darshpreets
anyone help
Liam
Could you please provide a minimal working example? * short enough, without inessential codes; * compilable and executable; * being able to reproduce the problem you have met.
darshpreets
#include <iostream> #include <string> using namespace std; int main() { string name, street, state; int zip; char more_data = 'Y'; do { cout<<"\n \nName.........."; getline(cin,name); cout<<"Street........"; getline(cin,street); cout<<"State........."; getline(cin,state); cout<<"Zip Code......"; cin>>zip; cout<<"\n \nEnter another Record? (Y/N) \t"; cin>>more_data; } while((more_data == 'y') ||(more_data == 'Y') ); }
darshpreets
Name..........das gupta Street........sdagv 144 State.........54 Zip Code......144 Enter another Record? (Y/N) y Name..........Street........ State......... Zip Code......
darshpreets
why on next iteration I'm getting whose Name.......Street without taking input I'm not able to figure it out.
Liam
can you look again
I was busy, sorry for the late response. When you type y, and press enter, std::cin eats y and puts it in more_data, and enter is left in the input stream. For the next loop of your do ... while loop, std::getline() eats the last enter, and dumps an empty string into name. This is why you get Name..........Street........ for the second loop.
darshpreets
ok go it
Liam
For Linux, press Ctrl + D after your Y; and for Windows, press Ctrl + Z. You'll get what you want.
darshpreets
so what I need to change for to prevent that enter to eat second time d
darshpreets
For Linux, press Ctrl + D after your Y; and for Windows, press Ctrl + Z. You'll get what you want.
But instead of user interfererance what do I can better do with code
Liam
FYI, int for ZIP number is not enough. In some country, ZIP could contain letters. E.g. UK.
Liam
You may want to have a look at: https://postal-code.co.uk/postcode/London
darshpreets
FYI, int for ZIP number is not enough. In some country, ZIP could contain letters. E.g. UK.
ok will fix it, thanks and what changes I need to do on code for desired working
Liam
so what I need to change for to prevent that enter to eat second time d
Try std::cin.ignore(). You may need to read the document.
darshpreets
Thanks a lot, I hope it will fix my code 😊
Liam
#include <limits> ... std::cin.ignore(std::numeric_limits<std::streamsize>::max(), '\n'); For example.
darshpreets
Thanks a lot it worked.
Liam
template<> // full specialization for std::hash struct std::hash<Type> { typedef Type argument_type; typedef size_t result_type; result_type operator()(const argument_type& t) const noexcept { return std::hash<int>{}(t.key); } }; triggers a bug of GCC (under 4.8.0), please note and bypass it (by surrouding with namspace std). : )
Sukesh
Hi< I am trying to use wiringPi http://wiringpi.com/download-and-install/ In a c++ program I have written the c++ code as follows. #include <wiringPi.h> int main (void) { wiringPiSetup () ; pinMode (0, OUTPUT) ; for (;;) { digitalWrite (0, HIGH) ; delay (500) ; digitalWrite (0, LOW) ; delay (500) ; } return 0 ; } But when i compile using the following statement g++ -Wall -o test test.cpp -lwiringPi I am getting the following error. /usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libwiringPi.so: undefined reference to `crypt' /usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libwiringPi.so: undefined reference to `pthread_join' /usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libwiringPi.so: undefined reference to `pthread_create' /usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libwiringPi.so: undefined reference to `shm_open' /usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libwiringPi.so: undefined reference to `pthread_cancel' Any one knows Why?
Sukesh
No. Trying. Thanks
Anonymous
hello goodmorning?
Sukesh
g++ -Wall -o test test.cpp -lwiringPi -lpthread -lrt This works. 3 errors fixed. Only one exist now //usr/local/lib/libwiringPi.so: undefined reference to `crypt'
Sukesh
Do we need to install anything for crypt?
Sukesh
Ok. Thanks.
Harry
Ok. Thanks.
try -lcrypt, may helps
Sukesh
try -lcrypt, may helps
Its works. Thanks you very much
Temur
Hi :D
Liam
Anonymous
i am striving to learn this c++...can anyone find the error in this program the program executs but I am not getting the correct output
Anonymous
Liam
In your codes, you made an assumption that c is initializated to 0. However, this assumption is not always correct. It would be better for you to explicitly initialize your variables before use. In your case, say int c = 0;.
Liam
BTW, this is C, not C++.
Anonymous
Oh..thanks a lot....this means a lot to me
Anonymous
Useful links send to all group useful google drive links Google drive movies - https://drive.google.com/drive/u/0/mobile/folders/0B6FjKMQKynZILTlwZHl4ajUwcFU ‌Programming language collection on google drive - https://drive.google.com/drive/folders/0ByWO0aO1eI_MN1BEd3VNRUZENkU Books- https://drive.google.com/drive/folders/0B0hgUX3me1_RNi1KTXBzXzdXSzA Google drive hacking ebook collection - https://drive.google.com/drive/folders/0B-JzQsKoJaANbTFGN0RWLWhONms Books for reading - https://drive.google.com/drive/folders/0B09qtt10aqV1SGxRVXBWYmNIS2M Books (novels) - https://drive.google.com/drive/folders/0B1v9Iy1jH3FXdlNDeUNHNEVsZlE Books - https://drive.google.com/drive/folders/0B1Ef5shqGHDNRGEwd3BYb0N3Um8 C programming tutorial google drive - https://drive.google.com/drive/folders/0B1qoi1IlEKwaM2tSMFBmOGUyNzg Udemy course google drive link - https://drive.google.com/drive/folders/0B1HQDi7EkA9XNlR3STF5SVJIVUk Programming books google drive - https://drive.google.com/drive/folders/0B2iEK7PB5AR-b01obXBHWHVHQzg Linux books - https://drive.google.com/drive/folders/0B1Wzf8eTK3LTYWtqOGlnQldTV2c 4K wallpaper google drive - https://drive.google.com/drive/folders/0Bx2Vez2N3qd7SGxkejRhQmdKQlk https://drive.google.com/drive/folders/0B2VhgL11XGQoamJCNGprcUJ2Zms Books for reading - https://drive.google.com/drive/folders/0B_qpgvDTe8kraTQ2QkM2S19tQWs Books- https://drive.google.com/drive/folders/0B4PtWlBoZ1rVSncxbi1JVFY4anM Best collection google drive- https://drive.google.com/drive/folders/0B3Qd1rlyIyR5bHo0dENpM1lSclk Banking exam preparation papers - https:// drive.google.com/drive/folders/0B079Cm0MfQeyS3R5cHVnb2RVUU0 Learning awareness banking lecture - 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 step by step - 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 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 development course- https://drive.google.com/drive/folders/0ByWO0aO1eI_MV0lhX1dkUlQ3YUk Programming books- https://drive.google.com/drive/folders/0B2iEK7PB5AR-b01obXBHWHVHQzg
Liam
https://www.google.com/doodles/celebrating-50-years-of-kids-coding A little programming game from Google, a good toy for kids.
Sukesh
Sukesh
I am working with an OpenWrt Project. I am using few packages for tool chain build and there is a make file for each package. I wanted to know that is there any way we can install that package in Linux development machine(Ubuntu) by using make command option? I am sharing a sample makefile also
Sukesh
If anyone having better idea, Please help?
Isc
Tell me what's declval and when it's used for
Isc
Please master
Isc
oh wow thanks
Isc
Hyml is really nice for wob poges
Liam
Programming languages are just tools. Just like the difference between knife and brush. You use knife to cut, and you use brush to clean. Every tool has its field to apply. In this field, the power of the tool is maxed, however in other fields, it will fail to do the job. Hence, there is no best and strongest language, there are just appropriate languages for a specific problem or project.
David
First learn english
David
I'm not able to understand you.
Liam
Good to know. However, if you want to communicate with each other here, you have to practice your English first.
Isc
Liam
Stanislav
Liam
Liam
Berkus
Stanislav
batman file
Liam
lol