View Single Post
Old Nov 4th, 2004, 11:06 PM   #3
tempest
Programming Guru
 
tempest's Avatar
 
Join Date: Oct 2004
Posts: 1,041
Rep Power: 6 tempest is on a distinguished road
Send a message via ICQ to tempest Send a message via AIM to tempest Send a message via Yahoo to tempest
I was going to say bubble sort Oh well.

Assuming you know C++:

#include <iostream>
#include <conio.h>

bool cArrEq(char first[], char second[]);
void test(char first[], second[]);

void main(int argc, char* argv[]) {
  char tests[3][32] = { "test", "test", "test2"};
  test(tests[0], test[1]);
  test(tests[0], test[2]);
  test(tests[1], test[2]);
  getch();
}

void test(char first[], char second[]) {
  /*
   * This is a runtime function so that
   * the operations in this function dont
   * have to be repeated numerous times in code...
   * -- no need to edit
   */
  printf("%s == %s\t%d\n", first, second, cArrEq(first, second));
}

bool cArrEq(char first[], char second[]) {
  /*
   * This function should return a true/false
   * value pertaining to if first and second
   * are equal to eachother... this should be 
   * flexible. char arrays should be able to
   * be of different sizes and still work.
   */
}

Just kidding! I knew this was a VB forum -crawls into fetal position in a corner with an embarassed look-
__________________

tempest is offline   Reply With Quote