Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


Vytis

Member Since 23 Apr 2014
Offline Last Active May 08 2014 11:13 AM

Posts I've Made

In Topic: Array Location? (C Programming)

23 April 2014 - 01:55 PM

You are not incrementing txtPtr to point to next character.

Basically you are converting the same character text_size times. Then searching for it in search array 26 times.

Change 45 line to
txtPtr = random_text + n;

But, there is a better way.
You could use the fact that letters a-z can be converted directly to integer 0-25 using ASCII table.
I leave the rest for You. A hint about debugger is also useful.

PARTNERS