|
Migrated application from VS2010 to VS2017.
application is looking for
errorStruct.lib file.. and it is not available on my system.
Is this VS2017 file which is missing?
Guide me on this.
|
|
|
|
|
Check your project to see where it is being referenced from.
|
|
|
|
|
Code is here
CSiBatchJobMigrationDlg::CSiBatchJobMigrationDlg(CWnd* pParent )
: CDialog(CSiBatchJobMigrationDlg::IDD, pParent)
{
m_sDatabase = _T("");
m_leaveDevRow = TRUE;
m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
m_pMenu = new CMenu;
}
Giving me error in below line
SiBatchJobUpdateDlg updateDlg = SiBatchJobUpdateDlg(this);
Code was working fine in VS2010 but getting this error after migration from vs2010 to vs2017
|
|
|
|
|
Hello,
I suppose that this should be better :
SiBatchJobUpdateDlg updateDlg(this);
|
|
|
|
|
|
There are a total of P levels. For any level p, there are Jp nodes. Any two nodes on the same level are not connected. And the unidirectional path weight between any two nodes Ai and Bj is D(i,j).
What is the shortest distance required from the first layer to the Pth layer?
(** Note that P is generally large and it is not recommended to traverse all possible situations **)
If this problem is abstracted as a graph, then what is actually required is the shortest path from the first layer to the last layer of a fully connected network.
What I have tried:
Use deep search, Dijkstra algorithm, Floydw algorithm, etc. to search the shortest path from all J1 nodes in the first layer to the last layer in turn, and select the minimum value from the J1 values.
What I want to know is if there is a simpler algorithm to solve this problem?
|
|
|
|
|
If I understand this correctly, you're looking for a unidirectional path from the first layer to the pth layer, a path that includes each layer only once.
I would start with the second layer. Assign each node its shortest distance from the first layer, and record the first layer node whose edge was selected. Then proceed through each layer in the same way: for each node, find its shortest distance from the nodes in the previous layer (the current weight of a previous node plus its edge to the current layer). Eventually you will find the shortest distances to nodes in the pth layer, and thus the shortest path to that layer.
|
|
|
|
|
Simulated Annealing[^] could be effective. I don't know if it belongs to the 'simple algorithm' category.
|
|
|
|
|
Unfortunately it can in general not guarantee that it will find the global optimum. You can find a good guess very quickly, or you can slow the annealing to the pace of continental drifts and have a higher chance to find the correct answer, but you can never be 100% sure unless you test all options, i. e. brute force.
GOTOs are a bit like wire coat hangers: they tend to breed in the darkness, such that where there once were few, eventually there are many, and the program's architecture collapses beneath them. (Fran Poretto)
|
|
|
|
|
You are right, of course.
If the problem needs an exact solution, Simulated Annealing is not the right algorithm.
|
|
|
|
|
Simpler than Dijkstra? Seriously? Dijkstra is the obvious choice. You may be able to find a faster algorithm, but not a simpler one, unless you use brute force.
P.S.: I wasn't familiar with the Floyd-Warshall algorithm[^] (assuming that is what you were referring to). It seems like it is simply a specialiced version of Dijkstra applied to a weighted graph. Sounds like it's a perfect fit for this problem.
GOTOs are a bit like wire coat hangers: they tend to breed in the darkness, such that where there once were few, eventually there are many, and the program's architecture collapses beneath them. (Fran Poretto)
modified 27-Mar-20 4:57am.
|
|
|
|
|
Write and test the following function that attempts to remove all occurrences of an item from an array:
intremove(int a[], int& n, int x)
The function searches the first n elements of the array a for the item x. If an x is found, it is removed, all the elements above that position are shifted down, the
array size n is decremented. This is repeated until all occurrences of x in the array are removed and then the total number of elements removed is returned. If x is not
.Write your own Car class. The class data should include:
I. make (using an array of char),
II. year,
III. petrol,
IV. tankSize,
V. mpg (miles per gallon),
VI. owner (using an array of char).
The functions should include:
I. display,
II. fillPetrol: pass number of gallons as a parameter and return gallons actually input (before full),
III. drive: pass distance as a parameter and return distance actually travelled (stopping if empty),
IV. changeOwner (passing new name as a parameter).
V. You should also have two constructors (one with and one without parameters) and any other functions needed, such as full() and empty(). (Should these 2 functions be public or private?)
VI. Put code in the constructors to show when each is called (cout<< "Constructor X called";).
VII. Write a program to create and use a Car object, making sure it calls all the public functions.
|
|
|
|
|
We are happy to help people who have problems with code that they have written. However, we are not here to do their homework. Homework assignments are provided in order to test your knowledge, so it would not help you to be assessed on someone else's work. Give it a try, it may not be as difficult as you think.
|
|
|
|
|
|
It's all done. I even went so far as to grade it for you. Definitely a solid B. How would you like it delivered?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|
|
In Windows File Explorer I'm able to navigate to the folder "C:\Windows\System32\WDI".
However, when I try to open a handle to that directory, it inexplicably says that the path is not found!
The code I'm using is below. Does anyone know what I could be doing wrong? (I'm running Visual Studio as Admin, so that when I debug the program it should also be running as Admin.)
int main()
{
std::wstring Directory = L"C:\\Windows\\System32\\WDI\\*.*";
WIN32_FIND_DATA FindData;
HANDLE FINDHANDLE = FindFirstFile(Directory.c_str(), &FindData);
if (FINDHANDLE != INVALID_HANDLE_VALUE)
{
std::cout << "IT WORKED!\r\n";
}
else
{
std::cout << "DID NOT WORK!\r\n";
DWORD Error = GetLastError();
std::cout << "ERROR: " << Error << "\r\n";
}
}
It prints "Error: 3" which is "The system cannot find the path specified." Note that it does not say "Access is denied".
The difficult we do right away...
...the impossible takes slightly longer.
modified 21-Mar-20 17:19pm.
|
|
|
|
|
Nope you program doesn't get admin rights just because visual studio has them.
It launches the created EXE
In vino veritas
|
|
|
|
|
|
Thank you David.
I was tearing my hair out.
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
Hi everyone, I have such a task: "Given an integer square matrix. Determine the minimum among the sums of diagonal elements parallel to the main diagonal of the matrix." I have a code but I have problems compiling a flowchart for it, can you help me with compiling a flowchart or give tips? thanks in advance
thats my code:
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#define N_MIN -3
#define N_MAX 5
int main(int argc, char *argv[]){
int s,i,j,k,l,s1,t2,t1;
int a[5][5];
srand(time(NULL));
for(i=0;i<5;i++){
for(j=0;j<5;j++){
a[i][j]=rand()%(N_MAX-N_MIN+1)+N_MIN;
}
}
for(i=0;i<5;i++){
for(j=0;j<5;j++){
printf("%3d ",a[i][j]);
}
printf("\n");
}
k=0;
s=0;
l=0;
for (i=0; i<5; i++){
for (j=0; j<5; j++){
if (a[i][j]>=0){
if(a[i][j]%2==0)
l+=a[i][j];
k++;
}
}
if (k==5){
l=l;
}
else {
l=0;
}
s=s+l;
k=0;
}
s1=a[0][5-1];
for(i=1; i<5; i++){
t1=t2=0;
for(j=0; j<5-i; j++){
t1+=a[i+j][j];
t2+=a[j][i+j];
}
if(t1<s1) s1=t1;
if(t2<s1) s1=t2;
}
printf("vivod %d %d\n", s,s1);
return 0;
}
|
|
|
|
|
Can you write a line by line description of what this code does? Is this a question about the C language or or the typical symbols in flowcharts or something else?
"the debugger doesn't tell me anything because this code compiles just fine" - random QA comment
"Facebook is where you tell lies to your friends. Twitter is where you tell the truth to strangers." - chriselst
"I don't drink any more... then again, I don't drink any less." - Mike Mullikins uncle
|
|
|
|
|
Start by simply describing in english what each code section does, the flowchart will fall out from that.
It will only be a problem if you didn't write the code yourself
In vino veritas
|
|
|
|
|
I have migrated an application in vc++ application from VS2010 to VS2017 Professional.
I am able to build it successfully. But it the time of execution, it shows me below error:
'SiMDICnvs.exe' (Win32): Loaded 'C:\svn_wa\Wbcode\Trunk\Projects\SiMDICnvs\Debug\SiMDICnvs.exe'. Symbols loaded.
'SiMDICnvs.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ntdll.dll'. Cannot find or open the PDB file.
'SiMDICnvs.exe' (Win32): Loaded 'C:\Windows\SysWOW64\kernel32.dll'. Cannot find or open the PDB file.
'SiMDICnvs.exe' (Win32): Loaded 'C:\Windows\SysWOW64\KernelBase.dll'. Cannot find or open the PDB file.
'SiMDICnvs.exe' (Win32): Loaded 'C:\Windows\SysWOW64\oleaut32.dll'. Cannot find or open the PDB file.
'SiMDICnvs.exe' (Win32): Loaded 'C:\Windows\SysWOW64\msvcp_win.dll'. Cannot find or open the PDB file.
'SiMDICnvs.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ucrtbase.dll'. Cannot find or open the PDB file.
'SiMDICnvs.exe' (Win32): Loaded 'C:\Windows\SysWOW64\combase.dll'. Cannot find or open the PDB file.
'SiMDICnvs.exe' (Win32): Loaded 'C:\Windows\SysWOW64\rpcrt4.dll'. Cannot find or open the PDB file.
'SiMDICnvs.exe' (Win32): Loaded 'C:\Windows\SysWOW64\sspicli.dll'. Cannot find or open the PDB file.
'SiMDICnvs.exe' (Win32): Loaded 'C:\Windows\SysWOW64\cryptbase.dll'. Cannot find or open the PDB file.
'SiMDICnvs.exe' (Win32): Loaded 'C:\Windows\SysWOW64\bcryptprimitives.dll'. Cannot find or open the PDB file.
'SiMDICnvs.exe' (Win32): Loaded 'C:\Windows\SysWOW64\sechost.dll'. Cannot find or open the PDB file.
'SiMDICnvs.exe' (Win32): Loaded 'C:\Windows\SysWOW64\user32.dll'. Cannot find or open the PDB file.
'SiMDICnvs.exe' (Win32): Loaded 'C:\Windows\SysWOW64\mfc140d.dll'. Cannot find or open the PDB file.
'SiMDICnvs.exe' (Win32): Loaded 'C:\Windows\SysWOW64\advapi32.dll'. Cannot find or open the PDB file.
'SiMDICnvs.exe' (Win32): Loaded 'C:\Windows\SysWOW64\win32u.dll'. Cannot find or open the PDB file.
'SiMDICnvs.exe' (Win32): Loaded 'C:\Windows\SysWOW64\msvcrt.dll'. Cannot find or open the PDB file.
'SiMDICnvs.exe' (Win32): Loaded 'C:\Windows\SysWOW64\gdi32.dll'. Cannot find or open the PDB file.
'SiMDICnvs.exe' (Win32): Loaded 'C:\Windows\SysWOW64\gdi32full.dll'. Cannot find or open the PDB file.
'SiMDICnvs.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ole32.dll'. Cannot find or open the PDB file.
'SiMDICnvs.exe' (Win32): Loaded 'C:\Windows\SysWOW64\shlwapi.dll'. Cannot find or open the PDB file.
'SiMDICnvs.exe' (Win32): Loaded 'C:\Windows\SysWOW64\imm32.dll'. Cannot find or open the PDB file.
'SiMDICnvs.exe' (Win32): Loaded 'C:\Windows\SysWOW64\vcruntime140d.dll'. Cannot find or open the PDB file.
'SiMDICnvs.exe' (Win32): Loaded 'C:\Windows\SysWOW64\uxtheme.dll'. Cannot find or open the PDB file.
'SiMDICnvs.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ucrtbased.dll'. Cannot find or open the PDB file.
'SiMDICnvs.exe' (Win32): Loaded 'C:\Windows\SysWOW64\gdi32.dll'. Cannot find or open the PDB file.
'SiMDICnvs.exe' (Win32): Unloaded 'C:\Windows\SysWOW64\gdi32.dll'
'SiMDICnvs.exe' (Win32): Loaded 'C:\Windows\WinSxS\x86_microsoft.windows.common-controls_6595b64144ccf1df_5.82.17134.1304_none_9d23a7c03adb3d0b\comctl32.dll'. Cannot find or open the PDB file.
'SiMDICnvs.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ucrtbased.dll'. Cannot find or open the PDB file.
'SiMDICnvs.exe' (Win32): Unloaded 'C:\Windows\SysWOW64\ucrtbased.dll'
The thread 0x363c has exited with code -1073741515 (0xc0000135).
The thread 0x28dc has exited with code -1073741515 (0xc0000135).
The program '[3376] SiMDICnvs.exe' has exited with code -1073741515 (0xc0000135) 'A dependent dll was not found'.
Editor: moved to the C++ forum from the suggestions forum
modified 17-Mar-20 7:25am.
|
|
|
|
|
Wrong place to post this: this is for reporting and discussing problems with this site, not with your software.
Try here: Ask a Question[^] or here: C / C++ / MFC Discussion Boards[^]
But ... remember that we can't see your screen, access your HDD, or read your mind - we only get exactly what you type to work with. So give us as much relevant info as you can - like what you found when you looked at those locations, perhaps...
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|