Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8995847
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T23:40:26+00:00 2026-06-15T23:40:26+00:00

using ::bb::cascades::Application; #include <bb/cascades/Application> What do these two declaration mean? And are there any

  • 0
using ::bb::cascades::Application;

#include <bb/cascades/Application>

What do these two declaration mean?

And are there any good tutorials which states the using directive/declaration deeply?Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T23:40:26+00:00Added an answer on June 15, 2026 at 11:40 pm

    #include is a prepocessor directive. It basically tells the prepocessor to take the given file and replace the #include line with the files content.

    using on the other hand makes it possible to use names inside a namespace (structs, enums, functions) without the namespace prefix. In this case ::bb::cascades::Application will enable you to use write

    Application app;
    

    instead of

    ::bb::cascades::Application app;
    

    if ::bb::cascades::Application is a default-constructible class.

    “Why do I ever need to use #include?”

    In order to use a function or to create an object the compiler must know the structure of this things, for example the functions signature or the member and methods of a class. These things are written in header files. Lets have a look at a very simple example, where we provide some module (called module):

    The module module

    // MODULE_HPP
    // only declarations, no code
    namespace module{
        struct dummyStruct{
            void dummyMethod(char);
            char dummyMember;
        };
        double dummyFunc(double);
    };
    
    // MODULE_CPP
    // actual implementation
    namespace module{
        void dummyStruct::dummyMethod(char c){
            dummyMember = c;
        };
        void dummyFunc(double a){
            return a + 1;
        }
    };
    

    As you can see our module consists of a struct with a member and a method, and a simple function. Note that we wrap everything up in the namespace module. Now we have another program which wants to use module:

    #include <iostream>
    using module::dummyFunc;
    
    int main(){
        std::cout << dummyFunc(1) << std::endl;
    }
    

    And this won’t work, because the compiler doesn’t know about both the namespace module. You need to add the declaration, which can be done by using #include (see first paragraph of this answer):

    #include <iostream>
    #include "module.hpp"
    using module::dummyFunc;
    
    int main(){
        std::cout << dummyFunc(1) << std::endl;
    }
    

    Note that you’ll need to compile both module.cpp and main.cpp, otherwise you’ll get linker errors.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am developing a web application using JSF and JPA(Eclipse link). I have two
I have set up a BlackBerry Cascades-UI project. I am using QML to define
I'm working on a Rails web application with a MySQL database. I'm using migrations
I have an application in which I am trying to implement ManyToMany relation between
I use JPA/Hibernate with Spring transaction management in my application. There is a InspectionEntity
I'm using the jQuery.Cascade plugin in my Asp.Net MVC application. I've got it all
I'm using Hibernate with Spring in my application. I have been consistently using detached
I try to build some application using hibernate for persistence (my first one). The
I'm considering using PostgreSQL's Ltree module in my application to help with threaded comments.
I am writing an application that has typical two entities: User and UserGroup. The

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.