Thread: Problem with c++ error n dont execute [W7 64xbit]

  1. #1
    Registered User
    Join Date
    Dec 2010
    Posts
    14

    Unhappy Problem with c++ error n dont execute [W7 64xbit]

    Hi guyz.. i am very2x new in c++ n i am very interested in programing.. the problem is i cant even run a simple hello world program.. n alot of the source code always error.. [i copy paste the code and very2x sure there is no mistake bcoz its very simple code] even if i can compile it with no error.. i cant run it.. i using window 7 64x bit.. n using dev c++ as my compiler... i have try many code n all of it failed.. so frustrated... but some of source file that i download working with my compiler.... i cant understand what the problem is.. i am a student in electronic dip,, i realy2x need a solution for my prob... thx for u guyz help i am very2x appreciate it!

  2. #2
    Registered User
    Join Date
    Aug 2010
    Location
    Poland
    Posts
    733
    How can anyone know what errors you are having? Post some details and code examples which are supposed to compile and work.

  3. #3
    Registered User
    Join Date
    Dec 2010
    Posts
    14
    #include <iostream>
    int main()
    {
    std::cout <<"HI";
    return 0;
    }

    here is the code.. i can compile with no error.. but i cant run it.. and in some code that have <iostream.h> i will get undentified code.. i have survey a lot of website n forum.. they say just chage it from <iostream.h> to <iostream> but its still error.. --my universiti use window xp... n vb 6.0..very2x old =.=\

  4. #4
    Jack of many languages Dino's Avatar
    Join Date
    Nov 2007
    Location
    Chappell Hill, Texas
    Posts
    2,332
    What is the runtime error, and what is the output of the compile and link?
    Mainframe assembler programmer by trade. C coder when I can.

  5. #5
    Registered User
    Join Date
    Dec 2010
    Posts
    14
    i am sory.. im realy newbis,, what do u mean by the output of the compile n ink?,, here i include full log

    Compiler: Default compiler
    Building Makefile: "C:\Users\Kira Love Mayu\C ++\tester\Makefile.win"
    Executing make...
    make.exe -f "C:\Users\Kira Love Mayu\C ++\tester\Makefile.win" all
    g++.exe -c main.cpp -o main.o -I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include" -I"C:/Dev-Cpp/include/c++/3.4.2/backward" -I"C:/Dev-Cpp/include/c++/3.4.2/mingw32" -I"C:/Dev-Cpp/include/c++/3.4.2" -I"C:/Dev-Cpp/include"

    g++.exe main.o -o "Project1.exe" -L"C:/Dev-Cpp/lib"

    Execution terminated
    Compilation successful
    even i have succesfull compile with no error but i cant run it... my lecture teach me with old code that use <iostream.h> i scare later this will make a confusion... any tips for learning c++ from a pro like u guyz... plss
    Last edited by slambergamer; 12-17-2010 at 12:32 PM.

  6. #6
    Jack of many languages Dino's Avatar
    Join Date
    Nov 2007
    Location
    Chappell Hill, Texas
    Posts
    2,332
    OK, now answer why you can't run it.
    Mainframe assembler programmer by trade. C coder when I can.

  7. #7
    Registered User
    Join Date
    Dec 2010
    Posts
    14
    when i press the *.exe nothing pop up... i got dl other c++ source file.. most of it.. have error.. i dont think it have anythg to do with the code,, bcoz i download it from here

  8. #8
    Jack of many languages Dino's Avatar
    Join Date
    Nov 2007
    Location
    Chappell Hill, Texas
    Posts
    2,332
    Are you running it from an IDE or the command prompt under Windows?
    Mainframe assembler programmer by trade. C coder when I can.

  9. #9
    Registered User
    Join Date
    Dec 2010
    Posts
    14
    command prompt...

  10. #10
    Jack of many languages Dino's Avatar
    Join Date
    Nov 2007
    Location
    Chappell Hill, Texas
    Posts
    2,332
    Sorry, you'll have to buy a new PC.
    Mainframe assembler programmer by trade. C coder when I can.

  11. #11
    Registered User
    Join Date
    Dec 2010
    Posts
    14
    why? =.= os or pc prob?
    i am using asus laptop

  12. #12
    Registered User
    Join Date
    Dec 2010
    Posts
    14
    can i using virtual window. like vm-mare.. i will installl window xp n use that window for compile my program.. pls dont say i need to buy new pc . T.T!!! no $$ i love programing

  13. #13
    Registered User
    Join Date
    May 2009
    Posts
    4,183
    Use a Compiler that works under Windows 7 64 Bit OS.

    Tim S.

  14. #14
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,413
    What exactly do you do to run the program at the command prompt?
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  15. #15
    Registered User
    Join Date
    Dec 2010
    Posts
    14
    would u recommend 1 for me?? i have tried dev c++ latest.. n VB c++ 2010 express both occurs same prob

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Bin packing problem....
    By 81N4RY_DR460N in forum C++ Programming
    Replies: 0
    Last Post: 08-01-2005, 05:20 AM
  2. Replies: 5
    Last Post: 12-03-2003, 05:47 PM
  3. Execute Problem
    By Marc Sharp in forum C Programming
    Replies: 4
    Last Post: 11-22-2003, 02:25 AM
  4. beginner problem
    By The_Nymph in forum C Programming
    Replies: 4
    Last Post: 03-05-2002, 05:46 PM
  5. problem with output
    By Garfield in forum C Programming
    Replies: 2
    Last Post: 11-18-2001, 08:34 PM