Thread: Creating an Operator

  1. #1
    Registered User
    Join Date
    Sep 2004
    Posts
    39

    Creating an Operator

    Just wondering if it is possible to create your own operator? ex

    use <- instead of <<

    so
    cin >> test

    cin <-test
    or just
    <- test

  2. #2
    Slave MadCow257's Avatar
    Join Date
    Jan 2005
    Posts
    735
    like this?
    Code:
    #include <iostream>
    #define _ std::cout<<
    
    int main()
    {
    	_ "test\n";
        return 0;
    }

  3. #3
    & the hat of GPL slaying Thantos's Avatar
    Join Date
    Sep 2001
    Posts
    5,681
    No. You can not make up your own operators.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Profiler Valgrind
    By afflictedd2 in forum C++ Programming
    Replies: 4
    Last Post: 07-18-2008, 09:38 AM
  2. Smart pointer class
    By Elysia in forum C++ Programming
    Replies: 63
    Last Post: 11-03-2007, 07:05 AM
  3. Screwy Linker Error - VC2005
    By Tonto in forum C++ Programming
    Replies: 5
    Last Post: 06-19-2007, 02:39 PM
  4. Replies: 21
    Last Post: 04-25-2005, 07:18 PM
  5. operator overloading and dynamic memory program
    By jlmac2001 in forum C++ Programming
    Replies: 3
    Last Post: 04-06-2003, 11:51 PM