需要纠错 [英] Need Error correction

查看:66
本文介绍了需要纠错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

// testClass.cpp : main project file.

#include "stdafx.h"
#include "stdio.h"

using namespace System;

class aClass
{
    public aClass(char *partnumber)
  {
    printf("%s",partnumber);
  }

};

int main(array<System::String ^> ^args)
{

    aClass a("Hello");

    Console::WriteLine(L"Hello World");
    return 0;
}

推荐答案

<code>
#include "stdafx.h"
#include <stdio.h>
#include <stdlib.h>
class A
{
public:
    A(char* p)
    {
        printf("%s",p);
    }
};


void main()
{
    A A1 = "Test";
    
}</code>


try

try

class aClass
{
  public:

  aClass(char *partnumber)
  {
    printf("%s",partnumber);
  }

};



您已经混淆了C#和C ++声明



you''ve confused C# and C++ declarations


这篇关于需要纠错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆