Skip to main content
Stack Overflow
  1. About
  2. For Teams
Filter by
Sorted by
Tagged with
1 vote
1 answer
137 views

Suppose I'm implementing the function returning an std::optional<T>. In that function, I compute some condition, and then want to return either a value, or a nullopt. I can do it like so: std::...
0 votes
0 answers
55 views

My code is below: class GrandParent { public: GrandParent() {} virtual ~GrandParent() {} int grandparent_data = 100; }; class Parent1 : virtual public GrandParent { public: Parent1() {}...
0 votes
0 answers
26 views

Update the road assembly by sub assembly composser Hello Everyone, I need to create assembly of main road by sub-assembly composser, the road is two lane with median and jersey barries at the middle ...
1 vote
2 answers
77 views

I have the following class definitions. I would like to create an Alphabet of Letter classes where each Letter class is constructed using an argument from the parameter pack passed to the Alphabet ...
0 votes
1 answer
141 views

I am trying to represent assembly programs in Coq and compile them into a sequence of bytes. I have an assembly language, a decoder, a compiler, and proof that the decoder is the inverse of the ...
ixb's user avatar
  • 72
2 votes
2 answers
70 views

I have a function whose name parameter I want to provide tab completion for, the tab completion values are file names found in c:\temp. On top of using the files in c:\temp as values, I also want to ...
-1 votes
1 answer
123 views

Guys I have been working on this problem since morning (4 hours ago) and still couldn't find a proper answer. How can I set the Subsets with these conditions? So for example an A Set is a subset of A2 ...
0 votes
1 answer
44 views

We are keen to have 3D model overlay on Google map and handle the click event so show the graphs viz temperature and pressure realtime data. Also, the issues reported by the system to be notified to ...
0 votes
1 answer
87 views

If I'm constructing a non-trivial container like a custom map for example, and want to share code between the emplace and insert functions, one approach would be to have the insert function simply ...
0 votes
0 answers
99 views

Hi developers!I'm using Dart for flutter. I'm trying to figure out why the code below doesn't need 'late' or 'final' for its variables. I know what these terms mean, but I'm puzzled about when and ...
2 votes
1 answer
106 views

If I expect a string with space separated ints from user input (number of expected int's known), I can transfer it in haskell Data.Vector like this: main = do n <- readLn -- this is number ...
Evg's user avatar
  • 3,090
3 votes
2 answers
933 views

I am learning C++ using the books listed here. Now I came across the following statement from C++ Primer: When we allocate a block of memory, we often plan to construct objects in that memory as ...
user avatar
1 vote
3 answers
349 views

I am trying to solve a Trie problem, for which I create a TrieNode class as below: class TrieNode { public: bool isWord; TrieNode* children[26]; TrieNode() { isWord=false; ...
8 votes
2 answers
303 views

In C++, object constructors cannot be const-qualified. But - can the constructor of an object of class A know whether it's constructing a const A or a non-const A? Motivated by a fine point in the ...
9 votes
1 answer
2k views

How to in-place construct an optional aggregate? It seems I can only construct an optional single thing, and not an optional aggregate of things. #include <optional> #include <iostream> ...

15 30 50 per page
1
2 3 4 5
...
8

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