My code was working Great! until i added a vector named "resudibus"to my namespace in a windows form.
#pragma once
#include <Windows.h>
#include <msclr\marshal.h>
#include <iostream>
#include <string.h>
#include <vector>
#include <fstream>
using namespace std;
using namespace System;
using namespace System::IO;
using namespace msclr::interop;
namespace Project1 {
using namespace System;
using namespace System::ComponentModel;
using namespace System::Collections;
using namespace System::Windows::Forms;
using namespace System::Data;
using namespace System::Drawing;
/// <summary>
/// Summary for MyForm
/// </summary>
std::vector<int> resudibus(1);
it gives me the following error messages :
WinCLI.obj : error LNK2005: "class std::vector<int,class std::allocator<int> > Project1::resudibus" (?resudibus@Project1@@3V?$vector@HV?$allocator@H@std@@@std@@A) already defined in MyForm.obj
1>fatal error LNK1169: one or more multiply defined symbols found
But i am sure that i havent declared this file anywhere else, when i remove it everything starts to work as usual... What am i doing wrong here?