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 8321525
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T23:03:04+00:00 2026-06-08T23:03:04+00:00

In such form… #ifndef UNICODE #define UNICODE #endif #include <Windows.h> #include <iostream> class A

  • 0

In such form…

#ifndef UNICODE
#define UNICODE 
#endif


#include <Windows.h>
#include <iostream>

class A
{
public:
    void makeFoo(TCHAR* output)
    {
        wcscpy(outputBuffer,TEXT("Hello world ♥"));
    }
private:
    static const int MAX_OUTPUT_SIZE=2000;  
    static TCHAR outputBuffer[MAX_OUTPUT_SIZE];
};


int main()
{
    TCHAR string[255];

    A example;

    example.makeFoo(string);

    MessageBox(0,string,0,0);

    system("Pause");
    return 0;
}

… we have a
linking error!

1>main.obj : error LNK2001: unresolved external symbol “private:
static wchar_t * A::outputBuffer” (?outputBuffer@A@@0PA_WA)

  • 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-08T23:03:05+00:00Added an answer on June 8, 2026 at 11:03 pm

    The linker error occurs because you have not provided a definition for the A::outputBuffer anywhere. Fix this by writing this in file scope:

    TCHAR A::outputBuffer[A::MAX_OUTPUT_SIZE];
    

    The value of string is unexpected because that buffer is uninitialized; makeFoo does nothing with its argument, and you do not initialize the buffer manually. Therefore it can contain anything at all (“garbage”).

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

Sidebar

Related Questions

i got such form class CC extends CFormModel { public $static_field; public $fields; public
We have a place in a code of such form: void processParam(Object param) {
I have such form definition class: class HistorySliderType extends AbstractType { /** * {@inheritdoc}
I have a form such as : <form action='???' method='post' name='contact'> <input type=text class=inputContact
If I have a Django form such as: class ContactForm(forms.Form): subject = forms.CharField(max_length=100) message
I have a such form with many links: <form name=myform action= method=get id=form> <p>
I've seen lots of ways to label things in a form such as <label>
I am new to php. I want to have a form such as this:
html() should be used for setting content in non-form elements such as div's. **
In many prototype scripting cases, it's easier to just stick every form item (such

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.