Luigi thts exactly what i was trying to say..that .cfg has nothing to do with C/C++.
it is simply a config file and can be edited with a text editor not with a c++ program. notepad++ can also read c and c++ btw.
here let me give you an example of a .cfg file.
this is a autoexec.cfg file from game called avp2 (aliens vs predator 2). note that i removed about 80% of file content, just not to make post long.
Code:
"FARZ" "10000.000000"
"NUMCONSOLELINES" "0"
"LMFullBright" "0"
"JoinPopFilter" "0"
"SpeciesName" "Marine"
"JoinTypeFilter" "0"
"VS_SPRITES_NOZ" "128"
"CARDDESC" "display"
"NormalTurnRate" "1.500000"
"MouseInvertYAxis" "0"
"MODELLOD" "2.000000"
"OPTIMIZESURFACES" "1.0"
"LowViolence" "0"
"RunLock" "1"
"WeaponSway" "1"
"VS_SPRITES" "512"
"OrientOverlay" "1"
"ScalingMenus" "1"
"LIGHTMAP" "1"
"DetailLevel" "4"
"JoinDedicatedFilter" "0"
"VS_POLYGRIDS_TRANSLUCENT" "32"
"MouseSensitivity" "5.000000"
"SATURATE" "1"
"Sound16Bit" "1"
"FastTurnRate" "2.300000"
"MASTERPALETTEMODE" "1.000000"
"MaxWorldPoliesToDraw" "50000"
"SpecialFX" "2.000000"
"RATEENABLE" "2"
"VS_WORLDMODELS_CHROMAKEY" "256"
"modeldist1" "150.000000"
"UpdateRateInitted" "1"
"32BITTEXTURES" "1"
"GAMMA" "1.000000"
"BulletHoles" "100.000000"
"modeldist2" "250.000000"
"ObjectiveMessages" "1"
"MuzzleLight" "1"
"EnableHints" "1"
"NumRuns" "33.000000"
"DRAWSKY" "1"
"MsgMgrTimeScale" "0.950000"
"VS_CANVASES" "32"
"modeldist3" "350.000000"
"DETAILTEXTURES" "1"
AddAction PounceJump 27
AddAction EnergySift 28
AddAction MediComp 29
AddAction AxisForwardBackward -10004
enabledevice "##keyboard"
rangebind "##keyboard" "##45" 0.000000 0.000000 "LastWeapon"
rangebind "##keyboard" "##14" 0.000000 0.000000 "Taunt"
rangebind "##keyboard" "##43" 0.000000 0.000000 "TeamMessage"
rangebind "##keyboard" "##28" 0.000000 0.000000 "Message"
rangebind "##keyboard" "##15" 0.000000 0.000000 "ScoreDisplay"
rangebind "##keyboard" "##37" 0.000000 0.000000 "Strafe"
rangebind "##keyboard" "##32" 0.000000 0.000000 "StrafeRight"
rangebind "##keyboard" "##30" 0.000000 0.000000 "StrafeLeft"
rangebind "##keyboard" "##205" 0.000000 0.000000 "Right"
rangebind "##keyboard" "##203" 0.000000 0.000000 "Left"
rangebind "##keyboard" "##31" 0.000000 0.000000 "Backward"
rangebind "##keyboard" "##17" 0.000000 0.000000 "Forward"
rangebind "##keyboard" "##65" 0.000000 0.000000 "QuickLoad"
rangebind "##keyboard" "##64" 0.000000 0.000000 "QuickSave"
rangebind "##keyboard" "##13" 0.000000 0.000000 "NextHud"
scale "##mouse" "##x-axis" 0.001984
rangebind "##mouse" "##y-axis" 0.000000 0.000000 "Axis2"
scale "##mouse" "##y-axis" 0.002183
ModelAdd 0.000000 0.000000 0.000000
ModelDirAdd 0.000000 0.000000 0.000000
WMAmbient 0.000000 0.000000 0.000000