-2

So, this problem, for some reason it shows me this error (ubuntu, terminal, g++). I searched the net and didn't show anything similar to mine. The code is (gfdz.cpp)

#include <iostream>
#include <string>
using namespace std;

struct dynmass
{
    unsigned long int vm; //вместимость
    unsigned long int el; //количество элементов
};

int *i,*q;

void create()
{
    dynmass a;
    a.vm = 0;
    a.el = 0;
    i = new int[0];

    extern "a" 
    {
        void push();
        void remuve();
        int kolichestvo();
        int vmestimostb();
        int main;
    };
}
David Ranieri
  • 39,972
  • 7
  • 52
  • 94
Nikita
  • 1
  • 2

1 Answers1

2

What you have there is a language linkage specification. And within it, you have a bunch of function declarations.

A language specifications can only appear in namespace scope. Yours is in the block scope, so that's what's wrong with it. Also, "a" language linkage is not supported by standard c++ so you may need to consult your compiler manual to find out if it's supported.

eerorika
  • 232,697
  • 12
  • 197
  • 326