string function

This is a discussion on string function within the C++ Programming forums, part of the General Programming Boards category; Would anyone know of a function, or be able to write me a function that takes two parameters. String A, ...

  1. #1
    Registered User
    Join Date
    Sep 2001
    Posts
    44

    string function

    Would anyone know of a function, or be able to write me a function that takes two parameters. String A, and B. then returns true if String B is part of String A? I tried several times, and can't seem to get it right. Any help is most appreciated. Thanks.

  2. #2
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Location
    Waterloo, Texas
    Posts
    5,708
    string.h

    strstr()

    Returns null if not found.
    Code:
    #include <cmath>
    #include <complex>
    bool euler_flip(bool value)
    {
        return std::pow
        (
            std::complex<float>(std::exp(1.0)), 
            std::complex<float>(0, 1) 
            * std::complex<float>(std::atan(1.0)
            *(1 << (value + 2)))
        ).real() < 0;
    }

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 8
    Last Post: 04-25-2008, 03:45 PM
  2. String Class
    By BKurosawa in forum C++ Programming
    Replies: 117
    Last Post: 08-09-2007, 02:02 AM
  3. String issues
    By The_professor in forum C++ Programming
    Replies: 7
    Last Post: 06-12-2007, 10:11 AM
  4. Replies: 4
    Last Post: 03-03-2006, 02:11 AM
  5. Including lib in a lib
    By bibiteinfo in forum C++ Programming
    Replies: 0
    Last Post: 02-07-2006, 02:28 PM

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