User Profile

Collapse

Profile Sidebar

Collapse
Etrex
Etrex
Last Activity: Sep 21 '07, 08:49 PM
Joined: Sep 12 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Etrex
    replied to Rational Numbers in c++
    in C
    C++ without fear by Brian Overland has a great example on how to normalize fractions including on how to find greatest common factor and lowest common multiple. It is one of the two books I am using to muck my way thru learning cpp. Check out example 11.3, it goes something like:

    Spoonfeeding code removed - giving them the answer teaches them nothing, giving them an algorithm still makes them think about coding it (and hopefully...
    See more | Go to post

    Leave a comment:


  • Etrex
    replied to vector<string> to array question: very new to this
    in C
    Sorry was thinking out loud with last post :).

    What it boils down to is, I want to have access to individual columns contained within the file with the ability to search by protocol, local IP etc The file has the form of the following on each line, each column entry is seperated by a whitespace:

    Code:
    struct mystruct {
    	char date[10];
    	char time[11];
    	char direction[1];
    	char remoteip[15];
    ...
    See more | Go to post

    Leave a comment:


  • Etrex
    replied to vector<string> to array question: very new to this
    in C
    Thank you :)

    I can loop thru a vector using a normal index.
    Also I can loop thru a vector using a vector<type>::c onst_iterator that represents an address within a vector for use with *.

    Now to stuff the vector into an array for information parsing and gathering.

    bob
    See more | Go to post

    Leave a comment:


  • Etrex
    started a topic vector<string> to array question: very new to this
    in C

    vector<string> to array question: very new to this

    Hello,

    This is my first attempt at a c++ program, and it is a long post, please bear with me.
    I'm trying to read in a text file containing a firewall log, make the information searchable by an element (protocol, remote ip etc). The file is of known max width (65) containing 8 columns of known max size. The columns are seperated by white space. However, it is of unknown length. I read that to input this file in,...
    See more | Go to post
    Last edited by Ganon11; Sep 12 '07, 03:09 AM. Reason: Please use the [CODE] tags provided.
No activity results to display
Show More
Working...