Search Result

Collapse
2 results in 0.0013 seconds.
Keywords
Members
Tags
redeclaration
  •  

  • addison5390
    started a topic Member function redeclaration not allowed
    in C

    Member function redeclaration not allowed

    So, below is code for a binary tree, the structure is referred to as TreeNode. I'm having some trouble separating what information goes into the TreeNode.h file and the TreeNode.cpp file.

    Here is the .h file

    Code:
    #pragma once
    #ifndef TREENODE_H
    #define TREENODE_H
    #include <iostream>
    #include <string>
    class TreeNode{
    private:
    std::string word;
    int count;
    ...
    See more | Go to post

  • solita
    started a topic Doubt regarding extern usage
    in C

    Doubt regarding extern usage

    Will this compile? I have 1 header file , and it is included in 2 source files.
    1. What about re-declaration error ? (for arraysize... )
    2. #include always = textual substitution ??? Or does it have some intelligence ?

    my header file - consts.h:
    const int arraysize = 15;

    my sources file 1 - op1.cpp:

    #include "consts.h"
    char array1[arraysize];

    my source...
    See more | Go to post
Working...