c වල පොඩි උදව්වක් ඕනි

sachithmadu

Active member
  • May 9, 2011
    224
    113
    43
    c වල පොඩි උදව්වක් ඕනි

    මචන්ලා ඇයි C වලින් program කරපු ඒවා නෝර්මල් විදිහට exe එක ඕපන් කරන්ඩ හදපුවාම close වෙන්නේ ඕපන් උන ගමන්ම,ඒක හදාගන්නේ කොහොමද??


    Code blocks වලින් compile කරලා run කලාමනම් ඕපන් වෙලාම තියෙනවා... :)

    වෙනම exe එක රන් කරද්දි close වෙනවනේ.. :(

    ආ තව දෙයක් C සහ Objective C අතර වෙනස මොකක්ද :confused:
     

    Banned!

    Member
    Jun 30, 2013
    10,779
    1,070
    0
    Using 'system("pause");' before ending main() is the most common method.

    Code:
    int main() {   
     ...    
     ...     
    system("pause"); 
    
    }
    or

    This will wait for keypress at the end.

    Code:
    int main() {      
    getchar(); 
    }
     
    Last edited:
    • Like
    Reactions: sachithmadu

    Chamath2015

    Member
    Aug 29, 2015
    4,745
    576
    0
    Moratuwa
    Object C kiyanne ban Object Oriented tiyenna C. eka apple la unge MACOS ekata hadapu ekak. uba Mac Developing karanava nam Object C karapan.
     

    Suvin1122

    Well-known member
  • Feb 28, 2009
    12,517
    1,018
    113
    Elakiri Server....
    Oka wenne visual studio walane..
    project properties->linker->System->sub system walata console dipan... then run karaddi ctrl+f5 use karapan


    ehema nathnam main eke anthimata debug point ekak dapan..podi hack ekak..