Skip to main content
Stack Overflow
  1. About
  2. For Teams
Filter by
Sorted by
Tagged with
0 votes
0 answers
75 views

The short story is I am trying to have function templates and the main function in different compilation units like this (I am using g++ (GCC) 14.2.1 if it matters): // a.cpp template<typename T>...
0 votes
0 answers
61 views

A variable defined with inline keyword in C++ allows definition of the variable in multiple compilation units and lets linker to resolve these multiple definitions into a single one, as it is ...
2 votes
2 answers
130 views

Actually I was going through The Java Language Specification and I found a strange sentence from which I couldn't come to a conclusion. Since I'm not a native English speaker. If and only if packages ...
0 votes
2 answers
123 views

I define the struct A in the a.cpp in the first. // a.cpp #include"a.h" struct A { ...
2 votes
1 answer
108 views

I could not find any mention of this in the JLS, it only talks about how compilation units are placed in the unnamed module when they are in the unnamed package. Background: Many libraries require ...
1 vote
1 answer
411 views

I am writting an ordinary Java application and want to extract all ICompilationUnit of an input project (which is not necessary developed by Eclipse). As I am not developing an Eclipse plugin, I can'...
1 vote
1 answer
934 views

I have been coding in python for a couple months now, and something has always been on my mind. I know you can have classes in your .py file, but you don't have to. My question is, is it good practice ...
0 votes
2 answers
483 views

I have a shared library which exports a function that returns a string from a global variable like so: test.h: const std::string &test_get_name(); test.cpp: static std::string name = "Test"; ...
0 votes
2 answers
124 views

Can someone please help me to understand, why I can have the same class in two different compilation units without getting linker errors but not the same function in different compilation units? Many ...
0 votes
1 answer
219 views

I want to detect an error regarding an import statement. But compilation unit seems to detect errors inside the class declaration itself. My code on which I am experimenting is as follows : import ...
0 votes
1 answer
57 views

During my Java learning, I tried this piece of code which compiled & ran successfully. Can anybody please provide an explanation that why hasn't the compiler generated any error? I imported the ...
1 vote
0 answers
309 views

I'm trying to dynamically build a c# class from small pieces of code. We have a window where a user can enter c# code (valid or not), and we parse these strings into roslyn. I recently found an issue ...
3 votes
1 answer
2k views

I'm using JavaParser and following its Wiki. Problem is even though I change the method's name and add a parameter to it, the file doesn't update. In other words, changes are not saved. When I System....
3 votes
1 answer
349 views

My question is similar to Eclipse create CompilationUnit from .java file however I don't have a file and I would like to create a handle for a CompilationUnit with given contents without actually ...
3 votes
1 answer
6k views

I'm a beginner to the Java programming language. I want to extract the AST from java source code and print the AST to a file or standard output. I followed this tutorial to learn how to work with AST....

15 30 50 per page
1
2

AltStyle によって変換されたページ (->オリジナル) /