for the programmers in da hizzouse...

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • iroc409
    Confirmed User
    • Jan 2003
    • 4728

    #1

    for the programmers in da hizzouse...

    got a quick question...

    ok, i'm reading from a file, and if the first character in the file is a backslash (\), i need to tell it to go to the next *line* of the document, not next character. i can increment the pointer, but that just goes to the next character. anyone?

    also, if i have a pointer FILE *fp; can i use 'fp--' to decrement the pointer, go backwards through characters, or does that not work?

    thanks
    <a href="http://www.iroc409.com/"><img src="http://www.iroc409.com/adv/120x60.gif" border=0></a>


    icq: 1 7 6 4 2 0 9 6 0
    Gallery templates for ONLY $25! w00t!
  • SilverTab
    Confirmed User
    • Nov 2001
    • 5060

    #2
    You can't use -- to decrement a pointer...a pointer is just an integer representing an address in your memory...if you decrement it, you'll get some fucked up results....
    mmm my sig was too big... no more cool animation
    but hey still! need php? ICQ: 94586959

    Comment

    • iroc409
      Confirmed User
      • Jan 2003
      • 4728

      #3
      fuck... so how do i go backwards then? gonna have to find a way around that. i need to search text for a specific patter of 8 characters. but if i go through it, the pointer will be past it to replace, so i'd have to go backwards or something.... it's either that or use an array to store the file, but that uses a bunch of memory, there's got to be a way around that...

      it's been too long since i've done this stuff

      oh yeah, i just pulled the comments out of the file, fuck it. i can put those in the readme.
      Last edited by iroc409; 01-18-2003, 01:08 AM.
      <a href="http://www.iroc409.com/"><img src="http://www.iroc409.com/adv/120x60.gif" border=0></a>


      icq: 1 7 6 4 2 0 9 6 0
      Gallery templates for ONLY $25! w00t!

      Comment

      • iroc409
        Confirmed User
        • Jan 2003
        • 4728

        #4
        fucking microsnot...

        the compiler says the program runs, but then it dies in xp. if the program doesn't work, then it shouldn't let it run.

        no errors or warnings, according to visual studio...
        <a href="http://www.iroc409.com/"><img src="http://www.iroc409.com/adv/120x60.gif" border=0></a>


        icq: 1 7 6 4 2 0 9 6 0
        Gallery templates for ONLY $25! w00t!

        Comment

        Working...