Page 4 of 6 FirstFirst 123456 LastLast
Results 37 to 48 of 64

Thread: Ask any Question About C++ here!

  1. #37
    SufyanGujar is offline Senior Member+
    Last Online
    29th December 2010 @ 10:59 PM
    Join Date
    10 Oct 2009
    Location
    England, UK
    Age
    34
    Posts
    157
    Threads
    10
    Credits
    0
    Thanked
    7

    Default

    Quote adee143 said: View Post
    to kya bhai mein har program k lye <stdio.h> use kar sakta hun???
    aap kar sakte ho but zaroorat nahi,
    depends on if you use functions of
    dat library or header file, e.g.

    I will include <windows> if i am
    going to use stuff like Sleep(); etc

  2. #38
    stillawolf's Avatar
    stillawolf is offline Senior Member+
    Last Online
    14th February 2017 @ 11:09 PM
    Join Date
    13 May 2009
    Age
    37
    Posts
    298
    Threads
    12
    Credits
    11
    Thanked
    3

    Default

    Quote SufyanGujar said: View Post
    here is more relible code; try this, and get some better compiler;
    get Microsoft Visual C++ (Express Edition) or Dev-C++,

    Code:
    #include<iostream>
    #include<conio.h>
    #include<iomanip>
    
    using namespace std;
    
    int main()
    {
    system("CLS");
    double r, n1=132.364, n2=26.91;
    r=n1/n2;
    cout<<r<<endl;
    cout<<setprecision(5)<<r<<endl;
    cout<<setprecision(4)<<r<<endl;
    cout<<setprecision(3)<<r<<endl;
    cout<<setprecision(2)<<r<<endl;
    cout<<setprecision(1)<<r<<endl;
    getch();
    return 0;
    }
    idk why you think iostream is header file; its input output library;
    that means you dont need to include .h at the end of it, and the code
    i post is working perfectly with Microsoft Visual Studio as well as Dev-C++,
    try it, if it still dont work i cant do much cuz its your compiler, i use different
    compilers.

    Some compiler dont have some libraries installed, you need to manually
    install extra featurs.

    -Saif
    saif bhai salam,
    yar do cheezen hn..ya to mj manually change krna bata den libraries file ko..
    yar phir mj Ms Visual studio ya Dev-C++ ka link PM kr den mn Download kr loon..
    i will be your thankfull yar..
    please.. or abhi to mn multan ja raha hoon..
    wapsi pe ye check krta hoon jo pane diya ha..
    regards..

  3. #39
    SufyanGujar is offline Senior Member+
    Last Online
    29th December 2010 @ 10:59 PM
    Join Date
    10 Oct 2009
    Location
    England, UK
    Age
    34
    Posts
    157
    Threads
    10
    Credits
    0
    Thanked
    7

    Default

    Quote stillawolf said: View Post
    saif bhai salam,
    yar do cheezen hn..ya to mj manually change krna bata den libraries file ko..
    yar phir mj Ms Visual studio ya Dev-C++ ka link PM kr den mn Download kr loon..
    i will be your thankfull yar..
    please.. or abhi to mn multan ja raha hoon..
    wapsi pe ye check krta hoon jo pane diya ha..
    regards..
    Here you go, both are free, just download one u like most;

    Dev-C++: http://www.bloodshed.net/dev/devcpp.html
    Microsoft Visual C++: http://www.microsoft.com/express/vc/Default.aspx

    -Saif

  4. #40
    fine is offline Junior Member
    Last Online
    13th December 2009 @ 12:18 AM
    Join Date
    25 Jul 2009
    Age
    35
    Posts
    15
    Threads
    0
    Credits
    0
    Thanked: 1

    Default shoaib khan pakistan

    nice sharing hia bhai

  5. #41
    ahsanmujtaba's Avatar
    ahsanmujtaba is offline Senior Member+
    Last Online
    13th January 2013 @ 12:21 AM
    Join Date
    05 May 2009
    Location
    islambad
    Age
    33
    Posts
    1,450
    Threads
    67
    Credits
    940
    Thanked
    17

    Default

    waow great thread bhi main asa program likhna chahta hon kay agar main kch words horizontal likhon to wo vertical nazar ain

    ie. if i write 786 then output must be
    7
    8
    6

  6. #42
    SufyanGujar is offline Senior Member+
    Last Online
    29th December 2010 @ 10:59 PM
    Join Date
    10 Oct 2009
    Location
    England, UK
    Age
    34
    Posts
    157
    Threads
    10
    Credits
    0
    Thanked
    7

    Default

    Quote ahsanmujtaba said: View Post
    waow great thread bhi main asa program likhna chahta hon kay agar main kch words horizontal likhon to wo vertical nazar ain

    ie. if i write 786 then output must be
    7
    8
    6
    Here, just add as much as you want, i added about 13 characters;

    Code:
    #include <iostream>
    
    using namespace std;
    
    int main()
    {
        char saif[30] = {' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' '};
        
        cout << "Please Enter Characters to sort em out horizontally:\n";
        
        cin >> saif;
        
        cout << "\n\nHere is dat data sorted horizontaly:\n\n";
        cout << saif[0] << endl << saif[1] << endl << saif[2] << endl << saif[3] << endl
        << saif[4] << endl << saif[5] << endl << saif[6] << endl << saif[7] << endl << saif[8] << endl
        << saif[9] << endl << saif[10] << endl << saif[11] << endl << saif[12] << endl << saif[13] << endl << endl;
    
    	system ("PAUSE");
    	return 0;
    
    }
    -Saif

  7. #43
    stillawolf's Avatar
    stillawolf is offline Senior Member+
    Last Online
    14th February 2017 @ 11:09 PM
    Join Date
    13 May 2009
    Age
    37
    Posts
    298
    Threads
    12
    Credits
    11
    Thanked
    3

    Default kaysay yar kaysay??

    Quote knowldge_hunter said: View Post
    yeh errors i think so progrms key nahi balkey my computer mein jis drive mein apne c++ save ki hoi hay os mein headrefiles key folder mein setting thek nahi hay jhan tak mujy maloom hay.

    baqi sufyan bahi janty hunge baehter
    Aslamoalikum,
    yar sufyan bhai i am simple yar..
    deve bhi download ki and ms visual c bhi..
    but unka layout he different hai : /
    ms visual c to 180 mb ki hai
    net se downloading manti hai...

    yar knowledge hunter.. ka tareeka bata den agr ata hai to..
    k kaysay ye drive mn ja kr theek kia ja skta hai???

  8. #44
    SufyanGujar is offline Senior Member+
    Last Online
    29th December 2010 @ 10:59 PM
    Join Date
    10 Oct 2009
    Location
    England, UK
    Age
    34
    Posts
    157
    Threads
    10
    Credits
    0
    Thanked
    7

    Default

    Quote stillawolf said: View Post
    Aslamoalikum,
    yar sufyan bhai i am simple yar..
    deve bhi download ki and ms visual c bhi..
    but unka layout he different hai : /
    ms visual c to 180 mb ki hai
    net se downloading manti hai...

    yar knowledge hunter.. ka tareeka bata den agr ata hai to..
    k kaysay ye drive mn ja kr theek kia ja skta hai???

    Try this, if still get errors read following message;

    Code:
    #include <iostream>
    #include <conio.h>
    #include <iomanip>
    #include <windows.h>
    
    
    int main()
    {
    system("CLS");
    double r, n1=132.364, n2=26.91;
    r = n1/n2;
    std::cout << r << std::endl;
    std::cout << std::setprecision(5) << r << std::endl;
    std::cout << std::setprecision(4) << r << std::endl;
    std::cout << std::setprecision(3) << r << std::endl;
    std::cout << std::setprecision(2) << r << std::endl;
    std::cout << std::setprecision(1) << r << std::endl;
    
    system("PAUSE");
    return 0;
    }
    bro i have never used dat compiler, i dont know
    how to set it up, just download dat Dev C++,
    its simplest compiler i have ever seen,

    Here is the link: http://www.mediafire.com/?zhgcyyjnfnm

    or try to catch the errors yourself, its realy easy
    you probably just need to fix lil bit of dat code.
    btw which compiler you are using?

    -Saif

  9. #45
    stillawolf's Avatar
    stillawolf is offline Senior Member+
    Last Online
    14th February 2017 @ 11:09 PM
    Join Date
    13 May 2009
    Age
    37
    Posts
    298
    Threads
    12
    Credits
    11
    Thanked
    3

    Default

    ok i am trying that...
    by the way i am using

    Turbo C++ IDE

  10. #46
    knowldge_hunter is offline Senior Member+
    Last Online
    19th February 2010 @ 12:52 AM
    Join Date
    26 Oct 2009
    Posts
    44
    Threads
    4
    Credits
    945
    Thanked: 1

    Default

    what is exe?

    what is source file?

  11. #47
    stillawolf's Avatar
    stillawolf is offline Senior Member+
    Last Online
    14th February 2017 @ 11:09 PM
    Join Date
    13 May 2009
    Age
    37
    Posts
    298
    Threads
    12
    Credits
    11
    Thanked
    3

    Default

    exe execution files

  12. #48
    SufyanGujar is offline Senior Member+
    Last Online
    29th December 2010 @ 10:59 PM
    Join Date
    10 Oct 2009
    Location
    England, UK
    Age
    34
    Posts
    157
    Threads
    10
    Credits
    0
    Thanked
    7

    Default

    Quote knowldge_hunter said: View Post
    what is exe?

    what is source file?
    Quote stillawolf said: View Post
    exe execution files
    if u mean what is source file and execution file
    on bloodshed.net (Dev-C++), that is source
    code of compiler and exe is executable file.

    just download the 1 i uploaded on mediafire for you,

    -Saif

Page 4 of 6 FirstFirst 123456 LastLast

Similar Threads

  1. Solved Q21. ITD Winner Rank Question (Final Question)
    By Afridi in forum ITDunya 18th Anniversary (8 Nov 2023)
    Replies: 9
    Last Post: 8th November 2011, 10:09 PM
  2. Solved c++ question
    By shamsgul in forum Solved Problems (IT)
    Replies: 17
    Last Post: 11th July 2011, 01:17 AM
  3. new game question with question..........
    By lucky shah in forum Baat cheet
    Replies: 12
    Last Post: 16th July 2010, 02:53 AM
  4. a little question
    By esr in forum Ask an Expert
    Replies: 8
    Last Post: 10th October 2008, 12:02 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •