The problem with this question is... A cup measure is a measure of volume, but a gram is a measure of weight. It's like asking how many pounds in a gallon... You're using two entirely different forms of measurement, one of weight, the other of volume... So unless we know what substance you're needing to convert, we can't give a truly accurate answer... I.e... A cup of water will weigh more than a cup of flour. But for basic purposes the conversion is 1 cup = 240ml = 240 cc = 240 grams.
To measure 2 cups of flour to be made from cracker crumbs( 2 cracker equels 27 grams. Now how do I get 2 cups out of this ?