#Help needed #ifndef HELPER_H

1 messages · Page 1 of 1 (latest)

desert wave
#

Hi im having a hard time with trying to get my school lab to work for me the issue is coming from #ifndef HELPER_H it's giving me error codes: LNK2019, and LNK1120. I'm using Microsoft Visual Studio and the language is C++.

#

This is what's in my .h file

#ifndef HELPER_H
#define HELPER_H
#include <iostream>
#include <cstdlib>
#include <ctime>
#include <bitset>
#include <vector>
#include <limits>

namespace Helper {
    int GetValidatedInt(const char* strMessage, int nMinimumRange = 0, int nMaximumRange = 0);
    int getRandoInt(int min, int max);
    int whatsUrOrder(const std::string& menuName, const std::vector<std::string>& menuList);
    void DisplayIntForms(int value);
    void InputBufferBGone();
}

#endif // !HELPER_H
loud wigeon
#

Can you share the linker errors?

#

Generally a linker error is going to come from:

Declaring (and using) a function in a .h file but not implementing it in the .c/.cpp file, or
Declaring and implementing the function properly but not telling your compiler to compile the .c/.cpp file

shadow minnow
#

Or if you send your project or .sln file/folder I'd be glad to just look through and run it on my computer

desert wave