New course! Every coder should learn Generative AI!
Try a free lesson0
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
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.
0
Can i just use substrings and do a rand() ?