Top "Flags" questions

Flags are atomic data structures used to identify state in a program.

What does the g++ -D flag do?

I am looking at a CFLAGS of - CFLAGS=-g -w -D LINUX -O3 -fpermissive in a Makefile. What does …

linux compilation g++ flags
Autotools : how to set global compilation flag

I have a project with several sources directories : src/A /B /C In each, the Makefile.am contains AM_CXXFLAGS = …

c++ autotools autoconf flags automake
How to add flags with my intent in the manifest file

we know that there are flags which we can add to our intent using the addFlags() method in our java …

android android-intent android-manifest flags
How to avoid black screen on startActivity when FLAG_ACTIVITY_CLEAR_TASK is set?

I am launching a new activity using the following: Intent intent = new Intent(this, MyNewActivity.class); intent.addFlags(Intent.FLAG_…

android android-intent android-activity flags
Why is the Carry Flag set during a subtraction when zero is the minuend?

At the moment I write my own little library for arithmetic and logical operations for very big unsigned integers. To …

assembly x86 flags
Flags, enum (C)

I'm not very used to programming with flags, but I think I just found a situation where they'd be useful: …

c enums flags
How to make functions with flag parameters? (C++)

How could I make a function with flags like how Windows' CreateWindow(...style | style,...), for example, a createnum function: int …

c++ function flags
Best practice of using flags in Java method

What's the best practice for specifying flags in a Java method? I've seen SWT using int as bitfields, like: (example …

java swt flags enumset
Extension method for adding value to bit field (flags enum)

Instead of doing this to add a value to flags enum variable: MyFlags flags = MyFlags.Pepsi; flags = flags | MyFlags.Coke; …

c# .net enums flags bit-fields
flag package in Go - do I have to always set default value?

Is it possible not to set default value in flag package in Go? For example, in flag package you can …

go command-line-arguments flags