Do I have to make a whole app for this or is there a simpler way?
![]()
Random Word
Random word gives a single, unusual word with a short definition. Great for word of the day and to improve vocabulary.randomword.com
#include <iostream>
#include <ctime>
#include <cstdlib>
#include <vector>
#include <algorithm>
int main() {
// Seed the random number generator
std::srand(std::time(0));
// List of words in an array
std::string words[] = {"apple", "banana", "cherry", "date", "elderberry", "fig", "grape", "kiwi", "lemon", "mango"};
// Get the size of the array
int numWords = sizeof(words) / sizeof(words[0]);
// Convert array to vector for easier randomization
std::vector<std::string> wordsVec(words, words + numWords);
// Randomly shuffle the vector
std::random_shuffle(wordsVec.begin(), wordsVec.end());
// Print out the randomized list of words
std::cout << "Randomized list of words: " << std::endl;
for (const auto& word : wordsVec) {
std::cout << word << std::endl;
}
return 0;
}
You should try chat GPT.![]()
You could just use this website:
Random Word Generator | WordFinder®
Meet the random word generator that's a cut above. Get custom random word lists, plus definitions, with endless possibilities for games, writing prompts and more.wordfinder.yourdictionary.com
It maxes out at 50 words, so just keep generating a new list until you are bored.
You could do this in R. There is probably a free csv somewhere with all English language words and their definitions and then you could just randomize the list.I want a very long list of words and definitions like an actual dictionary, but in random.
Excel has a max of 1 million rows and there are only 170,000 some words in an unabridged dictionary so you could probably just open it in excel and assign a random number to each word and then sort ascending/descending.![]()
GitHub - manassharma07/English-Dictionary-CSV: English Dictionary in a CSV File
English Dictionary in a CSV File. Contribute to manassharma07/English-Dictionary-CSV development by creating an account on GitHub.github.com
I'm too chicken to click the link to the file but it claims to be a dictionary in csv format. If it really is, the rest is easy.
That AI is as dumb as bricks. Make an array of words to then...copy it to a vector. Why not just use a vector in the first place?You should try chat GPT.![]()
That AI is as dumb as bricks. Make an array of words to then...copy it to a vector. Why not just use a vector in the first place?![]()
He is trying to replicate random word of the day.are you wanting to randomize the order of the words with the definitions attached or random order the words with random descriptions?
I would rather it be from a pocket dictionary, those large dictionary's have a bunch of words nobody uses.If it's dead and I get bored enough at work on my weekend shift I might write a C++ program that can do it. I'm legit curious if I can make the entire database self contained into a single binary. I can't see why not, but I can't say I've ever tried to pack that much data into a single binary before. It might actually come in handy for another project I need to do where I have to translate data and there's millions of entries, but the data is static so I kinda don't want to have to use a database for it. This is kind of the same idea.
If your site only has words everybody uses, it won't be too interesting.I would rather it be from a pocket dictionary, those large dictionary's have a bunch of words nobody uses.
Depends on how many sesquipedalian people you know, I suppose.I would rather it be from a pocket dictionary, those large dictionary's have a bunch of words nobody uses.
The OP'squestionseems likea set-up fora bad joke.