Need help (url shorter) | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Need help (url shorter)

Can you give me example of url shorter program made in c++, i'm still confused and can't seem to get it working correctly

14th Apr 2020, 4:02 PM
David Yusuf de Waskito
David Yusuf de Waskito - avatar
2 Answers
+ 2
URL shorteners simply have a database and the server generates a random code, then assigns the original url to that code. Then when you access that link, the server looks up the database, pulls out the url and redirects you. C++ isn't the right language for this, I'm afraid.
15th Apr 2020, 9:58 PM
inxanedev!
inxanedev! - avatar
0
Can i just use substrings and do a rand() ?
20th Apr 2020, 3:27 PM
David Yusuf de Waskito
David Yusuf de Waskito - avatar