3,119 questions
0
votes
1
answer
75
views
Run time error related to main method error
I'm currently studying Java in general and inheritance in particular.
When I run the code below in an online editor it throws an error related to the main method, however, when I modify it as ...
2
votes
2
answers
234
views
Is there a Rust alternative to the GCC __attribute__((constructor)) and __attribute__((destructor))?
I have a function that I would like to call before my main function in rust:
fn init_stuff() {
// do stuff
}
and I was just wondering if there was any equivalent to the __attribute__((constructor)...
0
votes
0
answers
50
views
Why does changing entry function of my C application is causing SIGSEGV [duplicate]
I am trying to understand the entry point _start of a random C application which i had written, i wanted it to change to a different function so i changed it using the compiler flag while compiling my ...
9
votes
1
answer
402
views
Is there a way to have a short and two long command line argument alternatives for a parameter?
I have guessed multiple syntax variations to achieve this in a single line in the MAIN function. I know I could achieve it in two separate lines, but am looking for the cleaner solution and only ...
-4
votes
1
answer
104
views
Need for encapsulating main() [closed]
Since main() is made static so that JVM can access it without creating an object of the class in which it is defined, then what is the need for writing it in a class?
0
votes
1
answer
307
views
How to set up a java module to run directly (not via a .jar file) without having to specify a main class
How does one set up a java program that can be run as a module simply by doing java -m mymodule?
I know this is possible because I have seen it in, e.g., the jwebserver documentation; you can run this ...
0
votes
1
answer
343
views
invalid command name 'main:app' when I execute "uvicorn main:app --reload" [duplicate]
When I try to execute the command uvicorn main:app --reloadfor start my local server, the VSCode terminal throws the error invalid command name 'main:app'. The code below imports a variable from the ...
-1
votes
1
answer
141
views
Why am I getting error: "C2731: 'wWinMain' : function cannot be overloaded"?
I am getting this error in my program :
error C2731: 'wWinMain' : function cannot be overloaded
at this line:
int APIENTRY wWinMain(_In_ HINSTANCE hInst, _In_opt_ HINSTANCE hprevInst, _In_ LPCWSTR ...
0
votes
0
answers
62
views
How to resolve "Entry point Not Found" in release mode
I am developing one DLL in VC++ and its working while testing with my Test.exe app in debug mode. But while running Test.exe in release mode I am getting "Entry point Not Found" error
While ...
0
votes
1
answer
146
views
Why the name of the entry point in top level statements is "<Main>$" and not "Main"?
When we use top level statements in C# 9 (and later), where we can omit static void Main(string[] args) and internal class Program, our program does not begin at the Main method; but rather, <Main&...
0
votes
0
answers
80
views
Best approach for displaying license activation dialog
I have a text editor, now I'm implementing licensing support. Licenses are managed on a third-party server (SAAS).
Desired Flow
The user opens the editor.
If they have no license (first-time open):
...
-1
votes
1
answer
158
views
Exiting back to main menu
I am currently writing a basic program with multiple menus. I have a function called menu1(), which is called in main and handles the first set of menu options. My issue I am having is being able to ...
0
votes
0
answers
69
views
Python GUI runs separate scripts through subprocess calls, but doesn't work when packaged as .exe
I have an interface I've created called interface.py that runs a script based on the press of a button...
def submit_action(selected_item):
values = list(item_to_value[selected_item])
...
-1
votes
1
answer
113
views
Does every translation unit need to have a main function? [closed]
I have been reading the 2nd edition of A Tour of C++ by Bjarne Stroustroup and in section 3.2 on Separate Compilation, he mentions translation units.
A .cpp file that is compiled by itself (...
0
votes
1
answer
93
views
Should Portable Types Be Used in the Declaration of a Main Function? (C11)
This question came to me last night, and I couldn't find a definitive answer in my brief surf of Google. Should (or could) I use portable types (i.e int32_t) in the declaration of my program's main ...