Need a unique gift idea?
A Pastebin account makes a great Christmas gift
SHARE
TWEET

Untitled

a guest Jun 14th, 2018 46 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
 
  1. #include <iostream>
  2.  
  3. struct test_struct {
  4.     int a;
  5.     int b;
  6.     int c;
  7. };
  8.  
  9. constexpr test_struct test1 = [] {
  10.     test_struct t{};
  11.     t.c = 1;
  12.     t.a = 2;
  13.     return t;
  14. }();
  15.  
  16. int main() {
  17.     std::cout << test1.a;
  18. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top