Jump to content
  • Advertisement
Sign in to follow this  

SafeCracker program help!

This topic is 2176 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts


// learn.cpp : Defines the entry point for the console application.
#include "stdafx.h"
#include <iostream>
#include "safestuff.cpp"
#include "SafeCracker.cpp"
#include <string>
using namespace std;
int main()
cout << "Suprise, suprise!" << endl;
cout << "The combination is (once again)" <<endl;
cout << SafeCracker(12)<<endl;

return 0;


#include "stdafx.h"
#include <string>
using namespace std;
string SafeCracker(int SafeID);


#include "stdafx.h"
#include <string>
using namespace std;
string SafeCracker(int SafeID)
return "13-26-16";

This is the error code I do not understand, if you could help me out it would be much appreciated!

1>------ Build started: Project: learn, Configuration: Debug Win32 ------
1>SafeCracker.obj : error LNK2005: "class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl SafeCracker(int)" (?SafeCracker@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@H@Z) already defined in learn.obj
1>C:\Users\JonBecher\documents\visual studio 2012\Projects\learn\Debug\learn.exe : fatal error LNK1169: one or more multiply defined symbols found
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!