|
I am trying to apply DESPOT POMDP solver with using given examples to build my own decision making problem and I followed the documentation in the repository to build different relevant classes and functions in the header file
class SimpleState: public State {
public:
int position;
int context;
int time;
SimpleState();
SimpleState(int _position, int _context, int _time) :
rat_position(_position),
context(_context),
time(_time) {
}
SimpleState(int _state_id);
~SimpleState();
std::string text() const;
};
SimpleState::SimpleState() {
}
class StarMazeProblem : public DSPOMDP,
public MDP {
protected:
std::vector<std::vector<std::vector<State> > > transition_probabilities_;
mutable MemoryPool<SimpleState> memory_pool_;
std::vector<SimpleState*> states_;
mutable std::vector<ValuedAction> mdp_policy_;
public:
enum {CENTER = 0, RIGHT = 1, LEFT = 2};
public:
StarMazeProblem();
int NumStates() const;
void ComputeDefaultActions(std::string type) const;
ParticleUpperBound* CreateParticleUpperBound(std::string name = "DEFAULT") const; ScenarioUpperBound* CreateScenarioUpperBound(std::string name = "DEFAULT",
std::string particle_bound_name = "DEFAULT") const;
ScenarioLowerBound* CreateScenarioLowerBound(std::string name = "DEFAULT",
std::string particle_bound_name = "DEFAULT") const;
}
and in the `starmaze.cpp` file the relevant lines are
int StarMazeProblem::NumStates() const {
return CONTEXT * POSITIONS * TIME;
}
void StarMazeProblem::ComputeDefaultActions(string type) const {
cerr << "Default action = " << type << endl;
if (type == "MDP") {
const_cast<StarMazeProblem*>(this)->ComputeOptimalPolicyUsingVI();
int num_states = NumStates();
default_action_.resize(num_states);
double value = 0;
for (int s = 0; s < num_states; s++) {
default_action_[s] = policy_[s].action;
value += policy_[s].value;
}
} else {
cerr << "Unsupported default action type " << type << endl;
exit(0);
}
}
ScenarioLowerBound* StarMazeProblem::CreateScenarioLowerBound(string name,
string particle_bound_name="DEFAULT") const {
const DSPOMDP* model = this;
const StateIndexer* indexer = this;
const StatePolicy* policy = this;
ScenarioLowerBound* bound = NULL;
if (name == "TRIVIAL" ) {
bound = new TrivialParticleLowerBound(this);
} else if (name == "RANDOM") {
bound = new RandomPolicy(this,
CreateParticleLowerBound(particle_bound_name));
} else if (name == "MODE" || name == "DEFAULT") {
ComputeDefaultActions("MDP");
bound = new ModeStatePolicy(model, *indexer, *policy,
CreateParticleLowerBound(particle_bound_name));
} else {
cerr << "Unsupported scenario lower bound: " << name << endl;
exit(1);
}
return bound;
}
here I got the following error for the above code:
src/starmaze.cpp:301:36: error: passing 'const std::vector<int>' as 'this' argument discards qualifiers [-fpermissive]
default_action_.resize(num_states);
^
In file included from /opt/local/include/gcc7/c++/vector:64:0,
from ../../../include/despot/interface/lower_bound.h:4,
from ../../../include/despot/core/builtin_lower_bounds.h:4,
from src/starmaze.h:3,
from src/starmaze.cpp:1:
/opt/local/include/gcc7/c++/bits/stl_vector.h:689:7: note: in call to 'void std::vector<_Tp, _Alloc>::resize(std::vector<_Tp, _Alloc>::size_type) [with _Tp = int; _Alloc = std::allocator<int>; std::vector<_Tp, _Alloc>::size_type = long unsigned int]'
resize(size_type __new_size)
^~~~~~
I have basic c++ knowledge and I could not figure out the reason for the error since I followed the examples. Any suggestion?
|
|
|
|
|
Image Transformation
Digital images are represented as a matrix and each element in the matrix represents the RGB value of a pixel. Given the pixel values of a nXn image. Write a code to transform the image into another image by alternate swap of edge pixels. That is for example, given a 4 X 4 image as follows:
1 2 3 4
5 6 7 8
9 10 11 12
13 14 15 16
The edge elements of the above image are 1, 2, 3, 4, 8, 12, 16, 15, 14, 13, 9 and 5. The following steps are involved in the transformation:
1 and 3 are swapped
1 and 8 are swapped
1 and 16 are swapped
1 and 14 are swapped
1 and 9 are swapped
After doing alternate swap of edge elements the pixel values of the image looks as follows:
3 2 8 4
5 6 7 16
1 10 11 12
13 9 15 14
And given an image of dimension 5 X 5 as follows:
2 4 5 6 3
3 11 12 7 9
7 15 13 8 1
2 21 25 13 14
17 10 16 19 3
Should transform as:
5 4 3 6 1
3 11 12 7 9
2 15 13 8 3
2 21 25 13 14
7 10 17 19 16
Input Format
First line contains the dimension of the matrix, n
Next nxn lines contain the elements of the matrix in row major order. That is the elements in the first row are given followed by second row and so on
Output Format
Print the transformed nxn matrix in ‘n’ lines
Each line contains the elements of a row separated by a tab.
Note: There is a tab at the end of each line
|
|
|
|
|
|
I have two sets of classes, C++/CLI classes and native classes.
They are supposed to be counterparts of each other, used for passing messages & data between a managed module and a native module, with a mixed-mode module in between.
The CLI classes are set up thus: (You may have to meditate on this for a moment to see what I'm trying to do.)
public ref class Managed_base abstract
{
unsigned int _Data = 0;
virtual Native_base* GetNativeObject(unsigned int data) = 0;
}
public ref class Managed_derived : Managed_base
{
virtual Native_derived* GetNativeObject(unsigned int data) override
{
Native_derived* NativeObject = new Native_derived();
NativeObject->_Data = data;
return NativeObject;
}
} I'm trying to set it up so that if I call GetNativeObject on any managed derived class, it will return the corresponding derived native class.
That way I don't have to do any ugly casting when I call GetNativeObject.
But the compile error I get is, "Virtual function overriding with a covariant return type is not allowed in a managed class."
So my question is, is there any way to accomplish what I'm trying to do without having to cast the return type of the GetNativeObject method to the appropriate derived type?
Is there any pattern that does this?
EDIT:
I eventually decided to do away with the pure virtual method and the overriding methods in derived classes. I simply put a regular function into each derived class that returns the appropriate derived native class. It is not beautiful, but it works.
However, I would like to leave this question active, in case someone has any interesting ideas.
The difficult we do right away...
...the impossible takes slightly longer.
modified 12-Sep-20 16:49pm.
|
|
|
|
|
You can help me gird line opengl cli I got it
|
|
|
|
|
Don't post the same non-question to multiple forums.
|
|
|
|
|
|
Creating an OpenGL view on a Windows Form
I want to use this source code that you put, but with opengl 4.6 Does not run and gives an error
Severity Code Description Project File Line Suppression State
Error LNK2028 unresolved token (0A00004D) "extern "C" int stdcall wglMakeCurrent(struct HDC *,struct HGLRC__ *)" (?wglMakeCurrent@@$$J18YGHPAUHDC__@@PAUHGLRC__@@@Z) referenced in function "protected: int clrcall OpenGLForm::COpenGL::MySetPixelFormat(struct HDC *)" (?MySetPixelFormat@COpenGL@OpenGLForm@@$$FI$AAMHPAUHDC__@@@Z) CppCLR_WinformsProjekt2 C:\Users\living with sweet lo\source\repos\CppCLR_WinformsProjekt2\CppCLR_WinformsProjekt2\CppCLR_WinformsProjekt.obj 1
Severity Code Description Project File Line Suppression State
Error LNK2028 unresolved token (0A00004E) "extern "C" struct HGLRC__ * stdcall wglCreateContext(struct HDC *)" (?wglCreateContext@@$$J14YGPAUHGLRC__@@PAUHDC__@@@Z) referenced in function "protected: int clrcall OpenGLForm::COpenGL::MySetPixelFormat(struct HDC *)" (?MySetPixelFormat@COpenGL@OpenGLForm@@$$FI$AAMHPAUHDC__@@@Z) CppCLR_WinformsProjekt2 C:\Users\living with sweet lo\source\repos\CppCLR_WinformsProjekt2\CppCLR_WinformsProjekt2\CppCLR_WinformsProjekt.obj 1
Severity Code Description Project File Line Suppression State
Error LNK2028 unresolved token (0A00004F) "extern "C" int stdcall SetPixelFormat(struct HDC *,int,struct tagPIXELFORMATDESCRIPTOR const *)" (?SetPixelFormat@@$$J212YGHPAUHDC__@@HPBUtagPIXELFORMATDESCRIPTOR@@@Z) referenced in function "protected: int clrcall OpenGLForm::COpenGL::MySetPixelFormat(struct HDC *)" (?MySetPixelFormat@COpenGL@OpenGLForm@@$$FI$AAMHPAUHDC__@@@Z) CppCLR_WinformsProjekt2 C:\Users\living with sweet lo\source\repos\CppCLR_WinformsProjekt2\CppCLR_WinformsProjekt2\CppCLR_WinformsProjekt.obj 1
Severity Code Description Project File Line Suppression State
Error LNK2028 unresolved token (0A000051) "extern "C" int stdcall ChoosePixelFormat(struct HDC *,struct tagPIXELFORMATDESCRIPTOR const *)" (?ChoosePixelFormat@@$$J18YGHPAUHDC__@@PBUtagPIXELFORMATDESCRIPTOR@@@Z) referenced in function "protected: int clrcall OpenGLForm::COpenGL::MySetPixelFormat(struct HDC *)" (?MySetPixelFormat@COpenGL@OpenGLForm@@$$FI$AAMHPAUHDC__@@@Z) CppCLR_WinformsProjekt2 C:\Users\living with sweet lo\source\repos\CppCLR_WinformsProjekt2\CppCLR_WinformsProjekt2\CppCLR_WinformsProjekt.obj 1
Severity Code Description Project File Line Suppression State
Error LNK2028 unresolved token (0A000053) "extern "C" int stdcall SwapBuffers(struct HDC *)" (?SwapBuffers@@$$J14YGHPAUHDC__@@@Z) referenced in function "public: void __clrcall OpenGLForm::COpenGL::SwapOpenGLBuffers(void)" (?SwapOpenGLBuffers@COpenGL@OpenGLForm@@$$FQ$AAMXXZ) CppCLR_WinformsProjekt2 C:\Users\living with sweet lo\source\repos\CppCLR_WinformsProjekt2\CppCLR_WinformsProjekt2\CppCLR_WinformsProjekt.obj 1
Severity Code Description Project File Line Suppression State
Error LNK2028 unresolved token (0A000054) "extern "C" void __stdcall glClear(unsigned int)" (?glClear@@$$J14YGXI@Z) referenced in function "public: void __clrcall OpenGLForm::COpenGL::Render(void)" (?Render@COpenGL@OpenGLForm@@$$FQ$AAMXXZ) CppCLR_WinformsProjekt2 C:\Users\living with sweet lo\source\repos\CppCLR_WinformsProjekt2\CppCLR_WinformsProjekt2\CppCLR_WinformsProjekt.obj 1
Severity Code Description Project File Line Suppression State
Error LNK2028 unresolved token (0A000055) "extern "C" void __stdcall glClearColor(float,float,float,float)" (?glClearColor@@$$J216YGXMMMM@Z) referenced in function "public: void __clrcall OpenGLForm::COpenGL::Render(void)" (?Render@COpenGL@OpenGLForm@@$$FQ$AAMXXZ) CppCLR_WinformsProjekt2 C:\Users\living with sweet lo\source\repos\CppCLR_WinformsProjekt2\CppCLR_WinformsProjekt2\CppCLR_WinformsProjekt.obj 1
Severity Code Description Project File Line Suppression State
Error LNK2028 unresolved token (0A000058) "extern "C" struct HDC__ * stdcall GetDC(struct HWND *)" (?GetDC@@$$J14YGPAUHDC__@@PAUHWND__@@@Z) referenced in function "public: __clrcall OpenGLForm::COpenGL::COpenGL(class System::Windows::Forms::Form ^,int,int)" (??0COpenGL@OpenGLForm@@$$FQ$AAM@P$AAVForm@Forms@Windows@System@@HH@Z) CppCLR_WinformsProjekt2 C:\Users\living with sweet lo\source\repos\CppCLR_WinformsProjekt2\CppCLR_WinformsProjekt2\CppCLR_WinformsProjekt.obj 1
Severity Code Description Project File Line Suppression State
Error LNK2019 unresolved external symbol "extern "C" void __stdcall glClearColor(float,float,float,float)" (?glClearColor@@$$J216YGXMMMM@Z) referenced in function "public: void __clrcall OpenGLForm::COpenGL::Render(void)" (?Render@COpenGL@OpenGLForm@@$$FQ$AAMXXZ) CppCLR_WinformsProjekt2 C:\Users\living with sweet lo\source\repos\CppCLR_WinformsProjekt2\CppCLR_WinformsProjekt2\CppCLR_WinformsProjekt.obj 1
Severity Code Description Project File Line Suppression State
Error LNK2019 unresolved external symbol "extern "C" void __stdcall glClear(unsigned int)" (?glClear@@$$J14YGXI@Z) referenced in function "public: void __clrcall OpenGLForm::COpenGL::Render(void)" (?Render@COpenGL@OpenGLForm@@$$FQ$AAMXXZ) CppCLR_WinformsProjekt2 C:\Users\living with sweet lo\source\repos\CppCLR_WinformsProjekt2\CppCLR_WinformsProjekt2\CppCLR_WinformsProjekt.obj 1
Severity Code Description Project File Line Suppression State
Error LNK2019 unresolved external symbol "extern "C" int stdcall SwapBuffers(struct HDC *)" (?SwapBuffers@@$$J14YGHPAUHDC__@@@Z) referenced in function "public: void __clrcall OpenGLForm::COpenGL::SwapOpenGLBuffers(void)" (?SwapOpenGLBuffers@COpenGL@OpenGLForm@@$$FQ$AAMXXZ) CppCLR_WinformsProjekt2 C:\Users\living with sweet lo\source\repos\CppCLR_WinformsProjekt2\CppCLR_WinformsProjekt2\CppCLR_WinformsProjekt.obj 1
Severity Code Description Project File Line Suppression State
Error LNK2019 unresolved external symbol "extern "C" int stdcall ChoosePixelFormat(struct HDC *,struct tagPIXELFORMATDESCRIPTOR const *)" (?ChoosePixelFormat@@$$J18YGHPAUHDC__@@PBUtagPIXELFORMATDESCRIPTOR@@@Z) referenced in function "protected: int clrcall OpenGLForm::COpenGL::MySetPixelFormat(struct HDC *)" (?MySetPixelFormat@COpenGL@OpenGLForm@@$$FI$AAMHPAUHDC__@@@Z) CppCLR_WinformsProjekt2 C:\Users\living with sweet lo\source\repos\CppCLR_WinformsProjekt2\CppCLR_WinformsProjekt2\CppCLR_WinformsProjekt.obj 1
Severity Code Description Project File Line Suppression State
Error LNK2019 unresolved external symbol "extern "C" int stdcall SetPixelFormat(struct HDC *,int,struct tagPIXELFORMATDESCRIPTOR const *)" (?SetPixelFormat@@$$J212YGHPAUHDC__@@HPBUtagPIXELFORMATDESCRIPTOR@@@Z) referenced in function "protected: int clrcall OpenGLForm::COpenGL::MySetPixelFormat(struct HDC *)" (?MySetPixelFormat@COpenGL@OpenGLForm@@$$FI$AAMHPAUHDC__@@@Z) CppCLR_WinformsProjekt2 C:\Users\living with sweet lo\source\repos\CppCLR_WinformsProjekt2\CppCLR_WinformsProjekt2\CppCLR_WinformsProjekt.obj 1
Severity Code Description Project File Line Suppression State
Error LNK2019 unresolved external symbol "extern "C" struct HGLRC__ * stdcall wglCreateContext(struct HDC *)" (?wglCreateContext@@$$J14YGPAUHGLRC__@@PAUHDC__@@@Z) referenced in function "protected: int clrcall OpenGLForm::COpenGL::MySetPixelFormat(struct HDC *)" (?MySetPixelFormat@COpenGL@OpenGLForm@@$$FI$AAMHPAUHDC__@@@Z) CppCLR_WinformsProjekt2 C:\Users\living with sweet lo\source\repos\CppCLR_WinformsProjekt2\CppCLR_WinformsProjekt2\CppCLR_WinformsProjekt.obj 1
Severity Code Description Project File Line Suppression State
Error LNK2019 unresolved external symbol "extern "C" int stdcall wglMakeCurrent(struct HDC *,struct HGLRC__ *)" (?wglMakeCurrent@@$$J18YGHPAUHDC__@@PAUHGLRC__@@@Z) referenced in function "protected: int clrcall OpenGLForm::COpenGL::MySetPixelFormat(struct HDC *)" (?MySetPixelFormat@COpenGL@OpenGLForm@@$$FI$AAMHPAUHDC__@@@Z) CppCLR_WinformsProjekt2 C:\Users\living with sweet lo\source\repos\CppCLR_WinformsProjekt2\CppCLR_WinformsProjekt2\CppCLR_WinformsProjekt.obj 1
Severity Code Description Project File Line Suppression State
Error LNK2019 unresolved external symbol "extern "C" struct HDC__ * stdcall GetDC(struct HWND *)" (?GetDC@@$$J14YGPAUHDC__@@PAUHWND__@@@Z) referenced in function "public: __clrcall OpenGLForm::COpenGL::COpenGL(class System::Windows::Forms::Form ^,int,int)" (??0COpenGL@OpenGLForm@@$$FQ$AAM@P$AAVForm@Forms@Windows@System@@HH@Z) CppCLR_WinformsProjekt2 C:\Users\living with sweet lo\source\repos\CppCLR_WinformsProjekt2\CppCLR_WinformsProjekt2\CppCLR_WinformsProjekt.obj 1
Severity Code Description Project File Line Suppression State
Error LNK1120 16 unresolved externals CppCLR_WinformsProjekt2 C:\Users\living with sweet lo\source\repos\CppCLR_WinformsProjekt2\Debug\CppCLR_WinformsProjekt2.exe 1
|
|
|
|
|
Posting the same question over and over is frowned upon.
The most likely cause of unresolved external references is that you have not included a reference to a necessary DLL.
Open the project properties, go to Linker, Input and add the name(s) of the required LIB file(s).
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
I want to use this source code that you put, but with opengl 4.6 Does not run and gives an error
Severity Code Description Project File Line Suppression State
Error LNK2028 unresolved token (0A00004D) "extern "C" int stdcall wglMakeCurrent(struct HDC *,struct HGLRC__ *)" (?wglMakeCurrent@@$$J18YGHPAUHDC__@@PAUHGLRC__@@@Z) referenced in function "protected: int clrcall OpenGLForm::COpenGL::MySetPixelFormat(struct HDC *)" (?MySetPixelFormat@COpenGL@OpenGLForm@@$$FI$AAMHPAUHDC__@@@Z) CppCLR_WinformsProjekt2 C:\Users\living with sweet lo\source\repos\CppCLR_WinformsProjekt2\CppCLR_WinformsProjekt2\CppCLR_WinformsProjekt.obj 1
Severity Code Description Project File Line Suppression State
Error LNK2028 unresolved token (0A00004E) "extern "C" struct HGLRC__ * stdcall wglCreateContext(struct HDC *)" (?wglCreateContext@@$$J14YGPAUHGLRC__@@PAUHDC__@@@Z) referenced in function "protected: int clrcall OpenGLForm::COpenGL::MySetPixelFormat(struct HDC *)" (?MySetPixelFormat@COpenGL@OpenGLForm@@$$FI$AAMHPAUHDC__@@@Z) CppCLR_WinformsProjekt2 C:\Users\living with sweet lo\source\repos\CppCLR_WinformsProjekt2\CppCLR_WinformsProjekt2\CppCLR_WinformsProjekt.obj 1
Severity Code Description Project File Line Suppression State
Error LNK2028 unresolved token (0A00004F) "extern "C" int stdcall SetPixelFormat(struct HDC *,int,struct tagPIXELFORMATDESCRIPTOR const *)" (?SetPixelFormat@@$$J212YGHPAUHDC__@@HPBUtagPIXELFORMATDESCRIPTOR@@@Z) referenced in function "protected: int clrcall OpenGLForm::COpenGL::MySetPixelFormat(struct HDC *)" (?MySetPixelFormat@COpenGL@OpenGLForm@@$$FI$AAMHPAUHDC__@@@Z) CppCLR_WinformsProjekt2 C:\Users\living with sweet lo\source\repos\CppCLR_WinformsProjekt2\CppCLR_WinformsProjekt2\CppCLR_WinformsProjekt.obj 1
Severity Code Description Project File Line Suppression State
Error LNK2028 unresolved token (0A000051) "extern "C" int stdcall ChoosePixelFormat(struct HDC *,struct tagPIXELFORMATDESCRIPTOR const *)" (?ChoosePixelFormat@@$$J18YGHPAUHDC__@@PBUtagPIXELFORMATDESCRIPTOR@@@Z) referenced in function "protected: int clrcall OpenGLForm::COpenGL::MySetPixelFormat(struct HDC *)" (?MySetPixelFormat@COpenGL@OpenGLForm@@$$FI$AAMHPAUHDC__@@@Z) CppCLR_WinformsProjekt2 C:\Users\living with sweet lo\source\repos\CppCLR_WinformsProjekt2\CppCLR_WinformsProjekt2\CppCLR_WinformsProjekt.obj 1
Severity Code Description Project File Line Suppression State
Error LNK2028 unresolved token (0A000053) "extern "C" int stdcall SwapBuffers(struct HDC *)" (?SwapBuffers@@$$J14YGHPAUHDC__@@@Z) referenced in function "public: void __clrcall OpenGLForm::COpenGL::SwapOpenGLBuffers(void)" (?SwapOpenGLBuffers@COpenGL@OpenGLForm@@$$FQ$AAMXXZ) CppCLR_WinformsProjekt2 C:\Users\living with sweet lo\source\repos\CppCLR_WinformsProjekt2\CppCLR_WinformsProjekt2\CppCLR_WinformsProjekt.obj 1
Severity Code Description Project File Line Suppression State
Error LNK2028 unresolved token (0A000054) "extern "C" void __stdcall glClear(unsigned int)" (?glClear@@$$J14YGXI@Z) referenced in function "public: void __clrcall OpenGLForm::COpenGL::Render(void)" (?Render@COpenGL@OpenGLForm@@$$FQ$AAMXXZ) CppCLR_WinformsProjekt2 C:\Users\living with sweet lo\source\repos\CppCLR_WinformsProjekt2\CppCLR_WinformsProjekt2\CppCLR_WinformsProjekt.obj 1
Severity Code Description Project File Line Suppression State
Error LNK2028 unresolved token (0A000055) "extern "C" void __stdcall glClearColor(float,float,float,float)" (?glClearColor@@$$J216YGXMMMM@Z) referenced in function "public: void __clrcall OpenGLForm::COpenGL::Render(void)" (?Render@COpenGL@OpenGLForm@@$$FQ$AAMXXZ) CppCLR_WinformsProjekt2 C:\Users\living with sweet lo\source\repos\CppCLR_WinformsProjekt2\CppCLR_WinformsProjekt2\CppCLR_WinformsProjekt.obj 1
Severity Code Description Project File Line Suppression State
Error LNK2028 unresolved token (0A000058) "extern "C" struct HDC__ * stdcall GetDC(struct HWND *)" (?GetDC@@$$J14YGPAUHDC__@@PAUHWND__@@@Z) referenced in function "public: __clrcall OpenGLForm::COpenGL::COpenGL(class System::Windows::Forms::Form ^,int,int)" (??0COpenGL@OpenGLForm@@$$FQ$AAM@P$AAVForm@Forms@Windows@System@@HH@Z) CppCLR_WinformsProjekt2 C:\Users\living with sweet lo\source\repos\CppCLR_WinformsProjekt2\CppCLR_WinformsProjekt2\CppCLR_WinformsProjekt.obj 1
Severity Code Description Project File Line Suppression State
Error LNK2019 unresolved external symbol "extern "C" void __stdcall glClearColor(float,float,float,float)" (?glClearColor@@$$J216YGXMMMM@Z) referenced in function "public: void __clrcall OpenGLForm::COpenGL::Render(void)" (?Render@COpenGL@OpenGLForm@@$$FQ$AAMXXZ) CppCLR_WinformsProjekt2 C:\Users\living with sweet lo\source\repos\CppCLR_WinformsProjekt2\CppCLR_WinformsProjekt2\CppCLR_WinformsProjekt.obj 1
Severity Code Description Project File Line Suppression State
Error LNK2019 unresolved external symbol "extern "C" void __stdcall glClear(unsigned int)" (?glClear@@$$J14YGXI@Z) referenced in function "public: void __clrcall OpenGLForm::COpenGL::Render(void)" (?Render@COpenGL@OpenGLForm@@$$FQ$AAMXXZ) CppCLR_WinformsProjekt2 C:\Users\living with sweet lo\source\repos\CppCLR_WinformsProjekt2\CppCLR_WinformsProjekt2\CppCLR_WinformsProjekt.obj 1
Severity Code Description Project File Line Suppression State
Error LNK2019 unresolved external symbol "extern "C" int stdcall SwapBuffers(struct HDC *)" (?SwapBuffers@@$$J14YGHPAUHDC__@@@Z) referenced in function "public: void __clrcall OpenGLForm::COpenGL::SwapOpenGLBuffers(void)" (?SwapOpenGLBuffers@COpenGL@OpenGLForm@@$$FQ$AAMXXZ) CppCLR_WinformsProjekt2 C:\Users\living with sweet lo\source\repos\CppCLR_WinformsProjekt2\CppCLR_WinformsProjekt2\CppCLR_WinformsProjekt.obj 1
Severity Code Description Project File Line Suppression State
Error LNK2019 unresolved external symbol "extern "C" int stdcall ChoosePixelFormat(struct HDC *,struct tagPIXELFORMATDESCRIPTOR const *)" (?ChoosePixelFormat@@$$J18YGHPAUHDC__@@PBUtagPIXELFORMATDESCRIPTOR@@@Z) referenced in function "protected: int clrcall OpenGLForm::COpenGL::MySetPixelFormat(struct HDC *)" (?MySetPixelFormat@COpenGL@OpenGLForm@@$$FI$AAMHPAUHDC__@@@Z) CppCLR_WinformsProjekt2 C:\Users\living with sweet lo\source\repos\CppCLR_WinformsProjekt2\CppCLR_WinformsProjekt2\CppCLR_WinformsProjekt.obj 1
Severity Code Description Project File Line Suppression State
Error LNK2019 unresolved external symbol "extern "C" int stdcall SetPixelFormat(struct HDC *,int,struct tagPIXELFORMATDESCRIPTOR const *)" (?SetPixelFormat@@$$J212YGHPAUHDC__@@HPBUtagPIXELFORMATDESCRIPTOR@@@Z) referenced in function "protected: int clrcall OpenGLForm::COpenGL::MySetPixelFormat(struct HDC *)" (?MySetPixelFormat@COpenGL@OpenGLForm@@$$FI$AAMHPAUHDC__@@@Z) CppCLR_WinformsProjekt2 C:\Users\living with sweet lo\source\repos\CppCLR_WinformsProjekt2\CppCLR_WinformsProjekt2\CppCLR_WinformsProjekt.obj 1
Severity Code Description Project File Line Suppression State
Error LNK2019 unresolved external symbol "extern "C" struct HGLRC__ * stdcall wglCreateContext(struct HDC *)" (?wglCreateContext@@$$J14YGPAUHGLRC__@@PAUHDC__@@@Z) referenced in function "protected: int clrcall OpenGLForm::COpenGL::MySetPixelFormat(struct HDC *)" (?MySetPixelFormat@COpenGL@OpenGLForm@@$$FI$AAMHPAUHDC__@@@Z) CppCLR_WinformsProjekt2 C:\Users\living with sweet lo\source\repos\CppCLR_WinformsProjekt2\CppCLR_WinformsProjekt2\CppCLR_WinformsProjekt.obj 1
Severity Code Description Project File Line Suppression State
Error LNK2019 unresolved external symbol "extern "C" int stdcall wglMakeCurrent(struct HDC *,struct HGLRC__ *)" (?wglMakeCurrent@@$$J18YGHPAUHDC__@@PAUHGLRC__@@@Z) referenced in function "protected: int clrcall OpenGLForm::COpenGL::MySetPixelFormat(struct HDC *)" (?MySetPixelFormat@COpenGL@OpenGLForm@@$$FI$AAMHPAUHDC__@@@Z) CppCLR_WinformsProjekt2 C:\Users\living with sweet lo\source\repos\CppCLR_WinformsProjekt2\CppCLR_WinformsProjekt2\CppCLR_WinformsProjekt.obj 1
Severity Code Description Project File Line Suppression State
Error LNK2019 unresolved external symbol "extern "C" struct HDC__ * stdcall GetDC(struct HWND *)" (?GetDC@@$$J14YGPAUHDC__@@PAUHWND__@@@Z) referenced in function "public: __clrcall OpenGLForm::COpenGL::COpenGL(class System::Windows::Forms::Form ^,int,int)" (??0COpenGL@OpenGLForm@@$$FQ$AAM@P$AAVForm@Forms@Windows@System@@HH@Z) CppCLR_WinformsProjekt2 C:\Users\living with sweet lo\source\repos\CppCLR_WinformsProjekt2\CppCLR_WinformsProjekt2\CppCLR_WinformsProjekt.obj 1
Severity Code Description Project File Line Suppression State
Error LNK1120 16 unresolved externals CppCLR_WinformsProjekt2 C:\Users\living with sweet lo\source\repos\CppCLR_WinformsProjekt2\Debug\CppCLR_WinformsProjekt2.exe 1
|
|
|
|
|
I want to use this source code that you put, but with opengl 4.6 Does not run and gives an error
Severity Code Description Project File Line Suppression State
Error LNK2028 unresolved token (0A00004D) "extern "C" int stdcall wglMakeCurrent(struct HDC *,struct HGLRC__ *)" (?wglMakeCurrent@@$$J18YGHPAUHDC__@@PAUHGLRC__@@@Z) referenced in function "protected: int clrcall OpenGLForm::COpenGL::MySetPixelFormat(struct HDC *)" (?MySetPixelFormat@COpenGL@OpenGLForm@@$$FI$AAMHPAUHDC__@@@Z) CppCLR_WinformsProjekt2 C:\Users\living with sweet lo\source\repos\CppCLR_WinformsProjekt2\CppCLR_WinformsProjekt2\CppCLR_WinformsProjekt.obj 1
Severity Code Description Project File Line Suppression State
Error LNK2028 unresolved token (0A00004E) "extern "C" struct HGLRC__ * stdcall wglCreateContext(struct HDC *)" (?wglCreateContext@@$$J14YGPAUHGLRC__@@PAUHDC__@@@Z) referenced in function "protected: int clrcall OpenGLForm::COpenGL::MySetPixelFormat(struct HDC *)" (?MySetPixelFormat@COpenGL@OpenGLForm@@$$FI$AAMHPAUHDC__@@@Z) CppCLR_WinformsProjekt2 C:\Users\living with sweet lo\source\repos\CppCLR_WinformsProjekt2\CppCLR_WinformsProjekt2\CppCLR_WinformsProjekt.obj 1
Severity Code Description Project File Line Suppression State
Error LNK2028 unresolved token (0A00004F) "extern "C" int stdcall SetPixelFormat(struct HDC *,int,struct tagPIXELFORMATDESCRIPTOR const *)" (?SetPixelFormat@@$$J212YGHPAUHDC__@@HPBUtagPIXELFORMATDESCRIPTOR@@@Z) referenced in function "protected: int clrcall OpenGLForm::COpenGL::MySetPixelFormat(struct HDC *)" (?MySetPixelFormat@COpenGL@OpenGLForm@@$$FI$AAMHPAUHDC__@@@Z) CppCLR_WinformsProjekt2 C:\Users\living with sweet lo\source\repos\CppCLR_WinformsProjekt2\CppCLR_WinformsProjekt2\CppCLR_WinformsProjekt.obj 1
Severity Code Description Project File Line Suppression State
Error LNK2028 unresolved token (0A000051) "extern "C" int stdcall ChoosePixelFormat(struct HDC *,struct tagPIXELFORMATDESCRIPTOR const *)" (?ChoosePixelFormat@@$$J18YGHPAUHDC__@@PBUtagPIXELFORMATDESCRIPTOR@@@Z) referenced in function "protected: int clrcall OpenGLForm::COpenGL::MySetPixelFormat(struct HDC *)" (?MySetPixelFormat@COpenGL@OpenGLForm@@$$FI$AAMHPAUHDC__@@@Z) CppCLR_WinformsProjekt2 C:\Users\living with sweet lo\source\repos\CppCLR_WinformsProjekt2\CppCLR_WinformsProjekt2\CppCLR_WinformsProjekt.obj 1
Severity Code Description Project File Line Suppression State
Error LNK2028 unresolved token (0A000053) "extern "C" int stdcall SwapBuffers(struct HDC *)" (?SwapBuffers@@$$J14YGHPAUHDC__@@@Z) referenced in function "public: void __clrcall OpenGLForm::COpenGL::SwapOpenGLBuffers(void)" (?SwapOpenGLBuffers@COpenGL@OpenGLForm@@$$FQ$AAMXXZ) CppCLR_WinformsProjekt2 C:\Users\living with sweet lo\source\repos\CppCLR_WinformsProjekt2\CppCLR_WinformsProjekt2\CppCLR_WinformsProjekt.obj 1
Severity Code Description Project File Line Suppression State
Error LNK2028 unresolved token (0A000054) "extern "C" void __stdcall glClear(unsigned int)" (?glClear@@$$J14YGXI@Z) referenced in function "public: void __clrcall OpenGLForm::COpenGL::Render(void)" (?Render@COpenGL@OpenGLForm@@$$FQ$AAMXXZ) CppCLR_WinformsProjekt2 C:\Users\living with sweet lo\source\repos\CppCLR_WinformsProjekt2\CppCLR_WinformsProjekt2\CppCLR_WinformsProjekt.obj 1
Severity Code Description Project File Line Suppression State
Error LNK2028 unresolved token (0A000055) "extern "C" void __stdcall glClearColor(float,float,float,float)" (?glClearColor@@$$J216YGXMMMM@Z) referenced in function "public: void __clrcall OpenGLForm::COpenGL::Render(void)" (?Render@COpenGL@OpenGLForm@@$$FQ$AAMXXZ) CppCLR_WinformsProjekt2 C:\Users\living with sweet lo\source\repos\CppCLR_WinformsProjekt2\CppCLR_WinformsProjekt2\CppCLR_WinformsProjekt.obj 1
Severity Code Description Project File Line Suppression State
Error LNK2028 unresolved token (0A000058) "extern "C" struct HDC__ * stdcall GetDC(struct HWND *)" (?GetDC@@$$J14YGPAUHDC__@@PAUHWND__@@@Z) referenced in function "public: __clrcall OpenGLForm::COpenGL::COpenGL(class System::Windows::Forms::Form ^,int,int)" (??0COpenGL@OpenGLForm@@$$FQ$AAM@P$AAVForm@Forms@Windows@System@@HH@Z) CppCLR_WinformsProjekt2 C:\Users\living with sweet lo\source\repos\CppCLR_WinformsProjekt2\CppCLR_WinformsProjekt2\CppCLR_WinformsProjekt.obj 1
Severity Code Description Project File Line Suppression State
Error LNK2019 unresolved external symbol "extern "C" void __stdcall glClearColor(float,float,float,float)" (?glClearColor@@$$J216YGXMMMM@Z) referenced in function "public: void __clrcall OpenGLForm::COpenGL::Render(void)" (?Render@COpenGL@OpenGLForm@@$$FQ$AAMXXZ) CppCLR_WinformsProjekt2 C:\Users\living with sweet lo\source\repos\CppCLR_WinformsProjekt2\CppCLR_WinformsProjekt2\CppCLR_WinformsProjekt.obj 1
Severity Code Description Project File Line Suppression State
Error LNK2019 unresolved external symbol "extern "C" void __stdcall glClear(unsigned int)" (?glClear@@$$J14YGXI@Z) referenced in function "public: void __clrcall OpenGLForm::COpenGL::Render(void)" (?Render@COpenGL@OpenGLForm@@$$FQ$AAMXXZ) CppCLR_WinformsProjekt2 C:\Users\living with sweet lo\source\repos\CppCLR_WinformsProjekt2\CppCLR_WinformsProjekt2\CppCLR_WinformsProjekt.obj 1
Severity Code Description Project File Line Suppression State
Error LNK2019 unresolved external symbol "extern "C" int stdcall SwapBuffers(struct HDC *)" (?SwapBuffers@@$$J14YGHPAUHDC__@@@Z) referenced in function "public: void __clrcall OpenGLForm::COpenGL::SwapOpenGLBuffers(void)" (?SwapOpenGLBuffers@COpenGL@OpenGLForm@@$$FQ$AAMXXZ) CppCLR_WinformsProjekt2 C:\Users\living with sweet lo\source\repos\CppCLR_WinformsProjekt2\CppCLR_WinformsProjekt2\CppCLR_WinformsProjekt.obj 1
Severity Code Description Project File Line Suppression State
Error LNK2019 unresolved external symbol "extern "C" int stdcall ChoosePixelFormat(struct HDC *,struct tagPIXELFORMATDESCRIPTOR const *)" (?ChoosePixelFormat@@$$J18YGHPAUHDC__@@PBUtagPIXELFORMATDESCRIPTOR@@@Z) referenced in function "protected: int clrcall OpenGLForm::COpenGL::MySetPixelFormat(struct HDC *)" (?MySetPixelFormat@COpenGL@OpenGLForm@@$$FI$AAMHPAUHDC__@@@Z) CppCLR_WinformsProjekt2 C:\Users\living with sweet lo\source\repos\CppCLR_WinformsProjekt2\CppCLR_WinformsProjekt2\CppCLR_WinformsProjekt.obj 1
Severity Code Description Project File Line Suppression State
Error LNK2019 unresolved external symbol "extern "C" int stdcall SetPixelFormat(struct HDC *,int,struct tagPIXELFORMATDESCRIPTOR const *)" (?SetPixelFormat@@$$J212YGHPAUHDC__@@HPBUtagPIXELFORMATDESCRIPTOR@@@Z) referenced in function "protected: int clrcall OpenGLForm::COpenGL::MySetPixelFormat(struct HDC *)" (?MySetPixelFormat@COpenGL@OpenGLForm@@$$FI$AAMHPAUHDC__@@@Z) CppCLR_WinformsProjekt2 C:\Users\living with sweet lo\source\repos\CppCLR_WinformsProjekt2\CppCLR_WinformsProjekt2\CppCLR_WinformsProjekt.obj 1
Severity Code Description Project File Line Suppression State
Error LNK2019 unresolved external symbol "extern "C" struct HGLRC__ * stdcall wglCreateContext(struct HDC *)" (?wglCreateContext@@$$J14YGPAUHGLRC__@@PAUHDC__@@@Z) referenced in function "protected: int clrcall OpenGLForm::COpenGL::MySetPixelFormat(struct HDC *)" (?MySetPixelFormat@COpenGL@OpenGLForm@@$$FI$AAMHPAUHDC__@@@Z) CppCLR_WinformsProjekt2 C:\Users\living with sweet lo\source\repos\CppCLR_WinformsProjekt2\CppCLR_WinformsProjekt2\CppCLR_WinformsProjekt.obj 1
Severity Code Description Project File Line Suppression State
Error LNK2019 unresolved external symbol "extern "C" int stdcall wglMakeCurrent(struct HDC *,struct HGLRC__ *)" (?wglMakeCurrent@@$$J18YGHPAUHDC__@@PAUHGLRC__@@@Z) referenced in function "protected: int clrcall OpenGLForm::COpenGL::MySetPixelFormat(struct HDC *)" (?MySetPixelFormat@COpenGL@OpenGLForm@@$$FI$AAMHPAUHDC__@@@Z) CppCLR_WinformsProjekt2 C:\Users\living with sweet lo\source\repos\CppCLR_WinformsProjekt2\CppCLR_WinformsProjekt2\CppCLR_WinformsProjekt.obj 1
Severity Code Description Project File Line Suppression State
Error LNK2019 unresolved external symbol "extern "C" struct HDC__ * stdcall GetDC(struct HWND *)" (?GetDC@@$$J14YGPAUHDC__@@PAUHWND__@@@Z) referenced in function "public: __clrcall OpenGLForm::COpenGL::COpenGL(class System::Windows::Forms::Form ^,int,int)" (??0COpenGL@OpenGLForm@@$$FQ$AAM@P$AAVForm@Forms@Windows@System@@HH@Z) CppCLR_WinformsProjekt2 C:\Users\living with sweet lo\source\repos\CppCLR_WinformsProjekt2\CppCLR_WinformsProjekt2\CppCLR_WinformsProjekt.obj 1
Severity Code Description Project File Line Suppression State
Error LNK1120 16 unresolved externals CppCLR_WinformsProjekt2 C:\Users\living with sweet lo\source\repos\CppCLR_WinformsProjekt2\Debug\CppCLR_WinformsProjekt2.exe 1
modified 30-Jul-20 12:00pm.
|
|
|
|
|
SADEGH2077 wrote: I want to use this source code that you put Who are you referring to? If you got the code from an article then please use the forum at the end of the article for your question. But please stop reposting it here.
|
|
|
|
|
TO OPENGL 4.6 Not responsive please help
|
|
|
|
|
It has already been suggested to you that you need to provide more information. We have no idea what your problem is and have no way of guessing.
|
|
|
|
|
Write a program in C++ that reads data from a file (ask user to enter file name). The number of elements in file are unknown so, you are supposed to regrow the array and dynamically allocate the memory every time it is needed.
Now, your task is to keep asking user two numbers, one is a num and second is location. Insert the num into that location and move the other elements to the right by re growing the array whenever needed. The function should keep asking user the number and location until user enters -99 in num.
Number = 74, Location = 3
Updated Data: 2 3 74 15 1 82 8 9 10 21 55 12 14 16 18
Number = -22, Location =5
Updated Data: 2 3 74 15 -22 1 82 8 9 10 21 55 12 14 16 18
Number = -99
Program Ended
|
|
|
|
|
Member 14856876 wrote: Write a program in C++ Doesn't say "request the code on a website".
Give it a try first.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
bacon Eddy plz help me in a program...give me ur fb id plzzzz
|
|
|
|
|
I don't have fb, insta nor even twitter.
Also, I don't do private answers; if you have a question, you post it here and have the answer benefit everyone.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
Task-01:
Write a program in C++ that reads data from a file (ask user to enter file name). The number of elements in file are unknown so, you are supposed to regrow the array and dynamically allocate the memory every time it is needed.
Your task is to implement a function which separates 1-digit and 2-digit numbers from data and store them in two separate files.
Make sure to make independent function for different functionalities.
SAMPLE OUTPUT:
Example
Data.txt: 14 2 3 15 1 82 8 9 10 21 55 12 14 16 18
Data: 2 3 15 1 82 8 9 10 21 55 12 14 16 18
One-digit: 2 3 1 8 9
Two-digit: 15 82 10 21 55 12 14 16 18
Task-02:
Write a program in C++ that reads data from a file (ask user to enter file name). The number of elements in file are unknown so, you are supposed to regrow the array and dynamically allocate the memory every time it is needed.
Now, your task is to keep asking user two numbers, one is a num and second is location. Insert the num into that location and move the other elements to the right by re growing the array whenever needed. The function should keep asking user the number and location until user enters -99 in num.
Make sure to make independent function for different functionalities.
Example
Data: 2 3 15 1 82 8 9 10 21 55 12 14 16 18
Number = 74, Location = 3
Updated Data: 2 3 74 15 1 82 8 9 10 21 55 12 14 16 18
Number = -22, Location =5
Updated Data: 2 3 74 15 -22 1 82 8 9 10 21 55 12 14 16 18
Number = -99
Program Ended
..........................
can u help me in solving any one of these??
|
|
|
|
|
Member 14856876 wrote: can u help me in solving any one of these?? Yes, it's easy. Read your course notes and follow the examples you have been given.
|
|
|
|
|
hahah what the hell..
i have try it for max 30 times now am srei cant do it and i have to submit my assignment today 10 PM and now its 9 PM am still trying
|
|
|
|
|
Well I am sorry, but it is your assignment so you are expected to do the work. It will not help you if you hand in something written by someone else. 1. It will not give your instructor a valid assessment of your ability to learn. 2. It is quite possible you will get kicked off the course for cheating.
|
|
|
|
|
ok sir thank u for ur time
|
|
|
|
|
Member 14856876 wrote: ok sir thank u for ur time And another suggestion: if you wish to be taken seriously then use proper words in your messages, and avoid using this childish txtspk.
|
|
|
|
|
Member 14856876 wrote: my assignment today 10 PM and now its 9 PM am still trying Welcome to the world where a promise equals a deadline.
No one will hand you a solution. Glad to help if you post some code that you tried, but not doing your assignment.
In a few years, you may be called upon to write medical software. My life might depend on you understanding what you're doing.
Failing one homework-assignment isn't the end of the world. We'll gladly help in the future too. If you wants it bad enough then you'll get there. But no muck, no brass. Get into the muck.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|