Mark Cuban and Warren Buffett agree on the No. 1 way to guarantee you'll never get rich

Self-made billionaire Mark Cuban
NBC | Getty Images

Entrepreneur Mark Cuban started with just a few $20 bills in his pocket.

At age 23, he graduated from Indiana University and set off for Texas "with $60, hole in my floorboard, case of oil in the trunk & a floor to sleep on in Dallas," he tweeted in July.

By age 32, the entrepreneur had already earned his first million: He had sold his first company, MicroSolutions, to CompuServe for $6 million.

Less than 10 years later, he sold his second company,, to Yahoo for $5.6 billion and became a self-made billionaire.

Cuban has some tips for those looking to build wealth, including what not to do. Don't pursue any get-rich quick schemes, he wrote on his blog in 2008: "There are no shortcuts. NONE."

Why Mark Cuban and other famous people don't use credit cards

He continues: "The less money you have, the more likely someone will come at you with some scheme. … Please ignore them. Always remember this: If a deal is a great deal, they aren't going to share it with you."

Cuban doesn't broadcast his deals and he suggests being skeptical of anyone who does. "I keep them all to myself," he writes. "If the person selling the deal was so smart, they would be rich beyond rich rather than trolling the streets looking to turn you into a sucker.

"There are no shortcuts."

Warren Buffett's secret to investing lays in the game of baseball

Self-made billionaire Warren Buffett agrees: "It's pretty easy to get well-to-do slowly. But it's not easy to get rich quick."

The golden rule of investing is to think long-term. The most successful investors, like Buffett, use the buy-and-hold strategy.

"The money is made in investments by investing," Buffett told CNBC in 2016, "and by owning good companies for long periods of time. If they buy good companies, buy them over time, they're going to do fine 10, 20, 30 years from now."

Like this story? Like CNBC Make It on Facebook!

Don't miss: Warren Buffett simplifies investing with a baseball analogy

Warren Buffett keeps his breakfast under $3.17