|
Those numbers do not mean anything, except to the operating system.
|
|
|
|
|
Problem 1 — Flawed MAC designs (11 marks) For this problem, you need to carefully trace through the given MAC algorithms, and
|
|
|
|
|
No idea what that is supposed to be. Maybe you lost connection while typing.
|
|
|
|
|
You never asked a question, but based on what other people are doing lately, it seems you're just trying to post your homework assignment from Chegg Study, thinking someone is going to write the code for you.
That's not going to happen.
|
|
|
|
|
Copy off of the guy sitting next to you. It's your only hope.
"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
|
|
|
|
|
Hi
I have a C DLL that processes data for a MFC C++ program. It happens to be my FTP folder where files are received from FTP. when I step thru the code under the VS debugger everything runs fine
I make a breakpoint in the MFC code and when after getting the ProcAddress I go into the function.
So how do I know what the problem is when I don't run under the VS debugger, well I have a SEH (handler that pops up with a messagebox and I attach the debugger and observe the rc from _sopen_s that fails)
I decided to put a MessageBox in when it fails (in the DLL) and upon entry to the DLL as well, in the hope that I can then attach the debugger and get a better idea but the messagebox fails to appear I do re-link the MFC program as well
I went as far a deleting the .lib TO ensure I was picking it up while linking the MFC program and I got a link error so I know its picking the .lib of the DLL
I am running both the (VS Debugger and the MFC program in administrator mode)
|
|
|
|
|
Well it could be any one of a million things, but without more information it is pointless trying to guess. Also deleting the .lib file does not guarantee that you are loading the correct .dll at execution time. You should start by rebuilding everything from clean to ensure that no component is out of sync. Secondly, and much more importantly, where does the EACCESS * error occur, and what is the code trying to do at that point?
*EACCESS is returned (most often) when trying to access some file/directory that is protected. And even when running in admin mode some things remain blocked.
|
|
|
|
|
The EACCESS occurs on _sopen_s the only thing I can think of regarding that is that I have the path + filename and maybe the open function only takes a file name
Regardless I’m gong you’re-build the DLL thanks
|
|
|
|
|
What exactly are you trying to open, and what sharing options are you using?
Quote: EACCES The given path is a directory, or the file is read-only, but an open-for-writing operation was attempted.
|
|
|
|
|
It’s a mainframe z/os sysadata file which is a binary representation of Z/OS Assembler program listing I have all the big endian conversion routines for going from mainframe to pc it did work as I was able to display the listing in the richedit that called the DLL and processed this file thanks
|
|
|
|
|
I have a code:
template <typename Func, typename... Args>
auto Add(Func&& f, Args&&... args)
{
using RetType = std::invoke_result_t<Func, Args...>;
and on last line, at compiling time I got:
error C7510: 'invoke_result_t': use of dependent type name must be prefixed with 'typename'
How can I overcome this error ?
|
|
|
|
|
I believe that typename is supposed the be prefixed to tell the compiler that invoke_result_t is defining a type:
using RetType = std::typename invoke_result_t<Func, Args...>;
|
|
|
|
|
I have tried:
using RetType = std::typename invoke_result_t<Func, Args...>;
but I got:
error C2589: 'typename': illegal token on right side of '::'
|
|
|
|
|
Try moving it to the front:
using RetType = typename std::invoke_result_t<Func, Args...>; This[^] may be of help.
|
|
|
|
|
I already did:
using RetType = typename std::invoke_result_t<Func, Args...>;
Result:
error C2760: syntax error: unexpected token '<', expected ';'
|
|
|
|
|
See "Helper types" on this page[^]. It looks like invoke_result_t is itself a type alias. Try std::invoke_result without the _t .
|
|
|
|
|
|
CString isWrong = _T(" is wrong");
CString andMsg = _T(" and ");
bool bCorrect[4];
int numOfFalse = 0;
for(int i=0; i<4; i++){
bCorrect[i] = true;
if(arrA[i] != arrB[i]){
bCorrect[i] = false;
numOfFalse++;
}
}
for(int i=0; i<4; i++){
if((bCorrect[i] == false) && (numOfFalse == 2))
{
strRslt.Format("Q%d", i+1);
m_listRslt.AddString(strRslt + isWrong);
}
}
I want to print out something like Q1 and Q2 is wrong. Can anyone teach me ?
|
|
|
|
|
if((bCorrect[i] == false) && (numOfFalse == 2))
{
strRslt.Format("Q%d%sQ%d%s", i, andMsg, i + 1, isWrong);
printf("%s\n", strRslt);
}
|
|
|
|
|
Assume the false value is random assign in the array. The program will check by itself which index has a 'false' then print out the index number.
For example,
index 0 and 3 have 'false', then
print out "Q1 and Q4 is wrong"
|
|
|
|
|
Try this, which keeps track of the number that are false:
strRslt = "";
int wrong = 0;
for(int i=0; i<4; i++)
{
if(bCorrect[i] == false)
{
if (wrong++ > 0)
strRslt.AppendFormat("%s", andMsg);
strRslt.AppendFormat("Q%d", i + 1);
}
}
if (wrong > 0)
{
strRslt.AppendFormat("%s", isWrong);
printf("%s\n", strRslt);
}
|
|
|
|
|
Try (not tested, but you get the idea)
bool bAlreadyIncorrect = false;
for(int i=0; i<4; i++)
{
if ( bCorrect[i] == false )
{
if ( bAlreadyIncorrect )
m_listRslt.AddString(" and ");
strRslt.Format("Q%d", i+1);
m_listRslt.AddString(strRslt);
bAlreadyIncorrect = true;
}
}
if (bAlreadyIncorrect)
m_listRslt.AddString( " is wrong");
"In testa che avete, Signor di Ceprano?"
-- Rigoletto
|
|
|
|
|
hello
I need help
Create a class Employee that includes:
1. Three instance variables: a Name(type string), HireYear(type
integer), and a monthly Salary (type double) .
2. A constructor that initializes the three instance variables .
3. Public methods :
a. Set and Get for each instance variable. If the monthly salary
is not positive, do not set its value .
b. GetEmployeeInfo: returns a string contains the employee
name, hire year, and his/her monthly salary.
|
|
|
|
|
Member 15128932 wrote: I need help Then you need to explain exactly what help you need. If you expect someone to do your work for you, I am afraid you have come to the wrong place. This site is here to help with code that you write.
|
|
|
|
|
So..., start coding.
And post here specific questions when you're stuck.
"In testa che avete, Signor di Ceprano?"
-- Rigoletto
|
|
|
|