Strings

This is a discussion on Strings within the C++ Programming forums, part of the General Programming Boards category; Hey, I'm parsing a string into a .dll like:- makewindow -adcbsf <name> <position> blah blah and I was wondering how ...

  1. #1
    Registered User
    Join Date
    Nov 2002
    Posts
    2

    Strings

    Hey, I'm parsing a string into a .dll like:-
    makewindow -adcbsf <name> <position> blah blah

    and I was wondering how I can take each section out and pass it through the Dll and the Dll will store this string then when its got the info will draw the window. I am a newbie so any help is great, thanks

  2. #2
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Location
    Waterloo, Texas
    Posts
    5,648
    Hmmm, well, first off, you're confused.

    Read a book on DLL's or look them up on the net. As to your other questions, it's simply a matter of parsing the string and then storing the data in an array or similar. So what are you asking? How to parse a string? How to store the data? A simple solution (if you know how to do neither) would be to store the data in a file like this:

    directive::
    makewindow
    -adcbsf
    <name>
    <position>
    directive::
    makeanotherwindow
    -xyz123
    <name>
    <position>
    Code:
    #include <ip.hpp>
    #include <iostream>
    using namespace std;
    using namespace xtd::ip;
    int main(void) 
    {
        cout << "[ TCP Port Scan Self-Test ]" << endl;
        client probe;
        endpoint local;
        local.address = "127.0.0.1";
        local.protocol = IPPROTO_TCP;
        for(local.port = 0; local.port < (1 << 16); ++local.port)
        {
            if(probe.open(local))
                cout << "Listening: ";
            else
                cout << "No Response: ";
            cout << local.port << endl;
        }    
    }

  3. #3
    Registered User
    Join Date
    Nov 2002
    Posts
    2

    Cheers

    thanks for thatI see where your comming from.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Strings Program
    By limergal in forum C++ Programming
    Replies: 4
    Last Post: 12-02-2006, 02:24 PM
  2. Programming using strings
    By jlu0418 in forum C++ Programming
    Replies: 5
    Last Post: 11-26-2006, 07:07 PM
  3. Reading strings input by the user...
    By Cmuppet in forum C Programming
    Replies: 13
    Last Post: 07-21-2004, 06:37 AM
  4. damn strings
    By jmzl666 in forum C Programming
    Replies: 10
    Last Post: 06-24-2002, 02:09 AM
  5. menus and strings
    By garycastillo in forum C Programming
    Replies: 3
    Last Post: 04-29-2002, 11:23 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21