function similar to strpos() ?

This is a discussion on function similar to strpos() ? within the C Programming forums, part of the General Programming Boards category; Well, since you haven't posted your sort code, no idea, aside from "there's a bug"....

  1. #16
    cwr
    cwr is offline
    Registered Luser cwr's Avatar
    Join Date
    Jul 2005
    Location
    Sydney, Australia
    Posts
    869
    Well, since you haven't posted your sort code, no idea, aside from "there's a bug".

  2. #17
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    Quote Originally Posted by cwr
    Well, since you haven't posted your sort code, no idea, aside from "there's a bug".
    That and no one has any idea who you're even talking to. Read this:
    Quote Originally Posted by willc0de4food
    cept sometimes, (i believe this happens in my sort function) like.. if your numbers are 23456 then it replies to you saying your numbers are 23444. sometimes, when the numbers are lower it will print up to 4 and then just print 4's. any ideas why?

    mm...i'm falling asleep typing. night
    Now who is this directed to? What sample input are you providing, what's it even supposed to do? What function are you even refering too?

    You have a fine knack for posting random jumbles of words that make no sense and have no context.


    Quzah.
    Hope is the first step on the road to disappointment.

  3. #18
    Shibby willc0de4food's Avatar
    Join Date
    Mar 2005
    Location
    MI
    Posts
    378
    yea..sorry about that. i'd been up all night and dont really remember posting that, lol. i'll make a more clear, specific post when i can go through my code without falling asleep, lol.
    Registered Linux User #380033. Be counted: http://counter.li.org

  4. #19
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,048
    Code:
            if (!s || !strlen(s))
                    return 0;
    ->
    Code:
        if(!s || !*s)
            return 0;
    dwk

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell


    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ: cpwiki.sf.net

    My website: http://dwks.theprogrammingsite.com/
    Projects: codeform, xuni, atlantis, nort, etc.

Page 2 of 2 FirstFirst 12
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. strpos() function in c?
    By mikewagan in forum C Programming
    Replies: 3
    Last Post: 03-19-2008, 07:05 AM
  2. dllimport function not allowed
    By steve1_rm in forum C++ Programming
    Replies: 5
    Last Post: 03-11-2008, 04:33 AM
  3. Calling a Thread with a Function Pointer.
    By ScrollMaster in forum Windows Programming
    Replies: 6
    Last Post: 06-10-2006, 09:56 AM
  4. Change this program so it uses function??
    By stormfront in forum C Programming
    Replies: 8
    Last Post: 11-01-2005, 08:55 AM
  5. c++ linking problem for x11
    By kron in forum Linux Programming
    Replies: 1
    Last Post: 11-19-2004, 10:18 AM

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