def get_identifiers(code_string):
    """
    Return all valid identifiers found in the C++ code string by finding
    uninterrupted strings that start with a character or an underscore and
    continues with characters, underscores or digits. Any spaces, tabs,
    newlines, paranthesis, punctuations or newlines will mark the end of
    an identifier (anything that is not underscore or alphanumeric).

    The returned set will include reserved keywords (if, for, while ...),
    names of types (float, double, int ...), names of functions that are
    called (cos, sin ...) in addition to any variables that are used or
    defined in the code.
    """
    identifiers = set()
    identifier = []
    for c in code_string + ' ':
        if identifier and (c == '_' or c.isalnum()):
            identifier.append(c)
        elif c == '_' or c.isalpha():
            identifier = [c]
        elif identifier:
            identifiers.add(''.join(identifier))
            identifier = None
    return identifiers