Anonymous
Hmm, didnt buy it, well written bot
Anonymous
Hmm
Rohit
How to parse the string on multiple character "abc][rfd][5][,][." ?? Should yield an array containing; abc rfd 5 , .
Dima
strtok maybe
Rohit
strtok maybe
it's used for single character
Dima
make array of these chars ([],.) and check
Dima
in loop
Dima
perhaps using strtok or just non equality op
Jussi
Its for multiple single characters
Rohit
No its not
can you write the algo then for above ques
Jussi
Sure
Rohit
Sure
https://ide.geeksforgeeks.org/dXpgeGMuhK Split this on -1
Rohit
Sure
It's done.. leave it
Jussi
ok
Anonymous
How to hack wifi password
Sharmarke
How to hack wifi password
Use apps hack wifi😁
Anonymous
Kaun sa
Igor🇺🇦
How to hack wifi password
Try 12345 in some more complicated cases 123456
Anonymous
App
Anonymous
Photoshop tricks
Anonymous
To photo editing
Aadarshhh
#include<iostream> using namespace std; class time { int hours,minutes,seconds,hrs1,mins1,secs1,hrs2,mins2,secs2; public: void set_time(int hrs,int mins,int secs) { hours=hrs; minutes=mins; seconds=secs; } void get_time() { cout<<"**First Time** :"<<endl<<"Enter first time in hour,minutes and seconds : "; cin>>hrs1>>mins1>>secs1; } void next_time() { cout<<endl<<"**Next Time** :"<<endl; cout<<"Enter next time in hour, minutes and seconds"; cin>>hrs2>>mins2>>secs2; } void show_time() { seconds=secs1+secs2; minutes=mins1+mins2+(seconds/60); hours=hrs1+hrs2+(minutes/60); minutes=minutes%60; seconds=seconds%60; cout<<"The time is "<<hrs1<<"hrs "<<mins1<<"mins "<<secs1<<"secs "<<endl << "The added time is"<<hours<<"hrs "<<minutes<<"mins "<<seconds<<"secs "; } }; int main() { time t; t.get_time(); t.next_time(); t.show_time(); }
Aadarshhh
Aadarshhh
can someone figure out bug in this program
Aadarshhh
Aadarshhh
here's the code
Dima
when I see someone asking how to hack wifi:
Dima
Đăng Lú
U didn't initialize the var t. U just declared it. That's the bug, I assume
Rohit
https://ide.geeksforgeeks.org/fMpM64RmXe can someone check this code, it should split on "ma" only but it is getting split on "a" , "m" and as well as "am" character too
Aadarshhh
thats not a problem
hmmm I'm just aliasing time with t
Đăng Lú
thats not a problem
How can u process data without data?
Jussi
if you give it "ma" as delims, it will use both "m" and "a" as delimeters
Dima
it will be initialized
Dima
then going to constructor
Jussi
if you want to delim only by having both "ma", you pretty much have to go thru the char array by hand
Rohit
yeah, that's how strtok works
Tell any other method, how to solve that
Đăng Lú
then going to constructor
I don't see any constructors.
Jussi
while(*str != 0) { if(*str== 'a' && *(str-1) == 'm') { // str-2 is now the last before "ma" } str++; }
Dima
well it can be constructorless but it will be initialized
Dima
and later destroyed on scope exit
Dima
local object
Dima
just try it
Dima
its not like c# or whatever style
Jussi
god damn my code sucks, now it should be ok
Rohit
god damn my code sucks, now it should be ok
can you edit that in that link only plz
Jussi
yeah sure
Aadarshhh
https://paste.ubuntu.com/p/s9Yr44VR6S/
Sharmarke
😅😅😅😅😅😅
Đăng Lú
well it can be constructorless but it will be initialized
I don't think that's what I mean. Without constructors, the object will initialize by default. But he didn't add any data and yet call method that request data from obj.
Rohit
yeah sure
Let me know when that programs work
Đăng Lú
I think that is where the bug goes. The compiler reports err that doesn't mean it will tell us exactly where to find.
Dima
yeah but if theres some initialized data in method it will be ok
Dima
but there are none
Dima
🤔
Đăng Lú
I'm away from my computer, so I wonder if anyone could help me test my theory?
Aadarshhh
hmm anyone there? I'm finding hard to understand it
Aadarshhh
https://ide.geeksforgeeks.org/oKFQCkRt60
Jussi
Let me know when that programs work
https://ide.geeksforgeeks.org/GfwogNqKjc
Rohit
Jussi
yeah
Jussi
there are still flaws
Jussi
but maybe that gets you going
Rohit
yeah
flaws what?? give link of code?
Jussi
well there is no flaw if the delimeter is 2 chars, but if it was 3 chars, then there would be possible read overflows
Đăng Lú
2018-06-06 18:41
Jussi
yep
Đăng Lú
thats not a problem
Sorry, u were right
Jussi
but I guess you can figure it out yourself
Đăng Lú
Aadarshhh
Watch out for semicolons.
where should it be placed?
Đăng Lú
Line 34