Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by ChiHappens

  1. ChiHappens

    bubble sort - two dimensional array - c++

    Yeah its a boolean value. in c++ a boolean value is defined by the keyword bool. it can be represented as zero and non-zero, or better yet, using TRUE and FALSE. It is used in the bubble sort to know when to exit. Hope this helps, Chi Happens Chi Happens "When you know and respect your...
  2. ChiHappens

    How to convert a string into a AnsiString?

    Just use c_str() on the ansistring, that converts it to a basic string. String MyAnsiString = "This is my string"; string MyBasicString; MyBasicString = MyAnsiString.c_str(); Caption = MyBasicString.c_str(); Chi Happens "When you know and respect your own inner...
  3. ChiHappens

    bubble sort - two dimensional array - c++

    lionelhill understood. thanks for the additional info. Chi Happens "When you know and respect your own inner nature, you know where you belong. You also know where you don't belong" - Benjamin Hoff
  4. ChiHappens

    bubble sort - two dimensional array - c++

    lionelhill, Certainly there are other, and more effecient sorting techniques like Radix Sort, but that isn't what was asked for. Here is a simple chart to compare the sorts: SORT WORST CASE AVERAGE Selection Sort n^2 n^2 Bubble Sort n^2 n^2 Insertion Sort...
  5. ChiHappens

    How to convert a string into a AnsiString?

    2ffat, Excellent. I have used c_str to convert ansistring for use with api calls, but it didn't even occur to me to convert the standard string to a c_string. lol, that ROCKS!!! Chi Happens "When you know and respect your own inner nature, you know where you belong. You also know where...
  6. ChiHappens

    How to convert a string into a AnsiString?

    std::string mybasic; String myansi; mybasic = &quot;this&quot;; for(int t=0;t<mybasic.length();t++) myansi += mybasic.at(t); Chi Happens Chi Happens &quot;When you know and respect your own inner nature, you know where you belong. You also know where you don't...
  7. ChiHappens

    bubble sort - two dimensional array - c++

    ah, it's pretty simple to open a file and read the contents. not much to that algorithm. i think i'll let you figure that out on your own. hint: use fstream Chi Happens Chi Happens &quot;When you know and respect your own inner nature, you know where you belong. You also know where you...
  8. ChiHappens

    Semaphores /File Access

    Kewl, let me know how it works out, or if you need some help. Chi Happens Chi Happens &quot;When you know and respect your own inner nature, you know where you belong. You also know where you don't belong&quot; - Benjamin Hoff
  9. ChiHappens

    Custom Corsur - link .RES file??

    try #pragma resource &quot;hammer.res&quot; Chi Happens &quot;When you know and respect your own inner nature, you know where you belong. You also know where you don't belong&quot; - Benjamin Hoff
  10. ChiHappens

    Image from .res file

    you should be able to use LoadImage to access the resouce images. you need to have #pragma resouce &quot;filename.res&quot; at the top of the code (replace filename with the name of your resource file) Then you can do this (if the bitmap within the resource is named BITMAP1, otherwise...
  11. ChiHappens

    Semaphores /File Access

    Sherak, Well if I were creating a client-server flat-file database system, I would have the server application control the read/write operations. That way only ONE application is actually opening the file. The client programs could send the data requests and updates through a port or the could...
  12. ChiHappens

    bubble sort - two dimensional array - c++

    a bubble sort is really simple (and quite effective) #include <iostream> #include <ctime> #include <conio.h> //--------------------------------------------------------------------------- using namespace std; //--------------------------------------------------------------------------- //...
  13. ChiHappens

    Port -&gt; Access to VB (import and parse multiple text files)

    CCLINT, Right you can use NEW keyword to instatiate a COM object. However, some COM objects do not recognize the new keyword and MUST be instatiated using the CreateObject method. Since I am a contract programmer, I tend to use the lowest common denominator and create all my object using...
  14. ChiHappens

    Port -&gt; Access to VB (import and parse multiple text files)

    Jeezus I'm full of mistakes tonight. Always remember, and never forget to delete your objects you create. So when you type Set objThis = CreateObject(&quot;whatever&quot;) you need to type Set objThis = Nothing when you no longer need it. Therefore, you need to include one last line...
  15. ChiHappens

    Port -&gt; Access to VB (import and parse multiple text files)

    One last thing...i made a typo: The line that reads: Dim CD as ADODB.Connection Should say Dim CN As ADODB.Connection. Chi Happens &quot;When you know and respect your own inner nature, you know where you belong. You also know where you don't belong&quot; - Benjamin Hoff

Part and Inventory Search

Back
Top