Jump to content

Welcome to Geeks to Go - Register now for FREE

Need help with your computer or device? Want to learn new tech skills? You're in the right place!
Geeks to Go is a friendly community of tech experts who can solve any problem you have. Just create a free account and post your question. Our volunteers will reply quickly and guide you through the steps. Don't let tech troubles stop you. Join Geeks to Go now and get the support you need!

How it Works Create Account
Photo

Running C-scripts


  • Please log in to reply

#1
tom_pauwaert

tom_pauwaert

    Member

  • Member
  • PipPip
  • 12 posts
ok so i'm new at programming, and i'm kinda familiar with turbo pascal crap and so on but i've made a little, very little thingy for in a C-script namely

#include <stdio.h>

main ()
{
int day,month,year;

printf ("Give the day, the month and the year in this order\n");
scanf ("%d%d%d", &day, &month, &year);

printf ("The date you gave in is: %d / %d / %d\n",day,month,year);
}

I know its very simple crap but it is my first thing ever and i want to try to run it, so i compile it... (press ALT + F9)

and press run (F9)

but there is like not a single window popping up in wich i can give the date or month or something

now since i'm a total newb, is this normal or, how can i make sure that it does pop up a window ?

(when i make the file, i open borland C++ builder 6 close whats open, press new, select C-script, or C-file whatever it is, it's the normal C thing, in case it matters :s )

i might be totally wrong, but i was thinking that maybe like turbo pascal you can like run your programs to try them out... i unno


any help would be very much appreciated

Edited by tom_pauwaert, 18 June 2005 - 03:00 PM.

  • 0

Advertisements


#2
CrAzY_J

CrAzY_J

    Member

  • Member
  • PipPip
  • 45 posts
Well if you press a month : 12
your code will [bleep] up immediatly.(sp?)

so fix all that so you can enter different dates.
im not farmiliar with Borland but you should try Bloodshed DevC++, it's higher recommended
  • 0

#3
tom_pauwaert

tom_pauwaert

    Member

  • Topic Starter
  • Member
  • PipPip
  • 12 posts
the problem is, i run the program (F9) but theres no window popping up in which i can enter data like month or day

the thing why i am using borladn c++ builder is because i have this book they use at the university (my dad got it for me) wich explains C-scripting (can also be done in c++ builder 6...) through borland, but they never explain the program itself :tazz:

and i don't know how to c++ program... i'm just starting with C
  • 0

#4
bdlt

bdlt

    Member

  • Member
  • PipPipPip
  • 876 posts
am not familiar with borland, but this tutorial might help borland tutorial

the source code you are using compiles and runs. make sure the extension for the filename is either .c or .cpp.
  • 0

#5
tom_pauwaert

tom_pauwaert

    Member

  • Topic Starter
  • Member
  • PipPip
  • 12 posts
yay, thx a lot bdlt i think this will really help ;)

cause writing the coude wasn't to much of a problem (jet) but running it (using the program) was the more difficult part for a nOOblet like me :tazz:

EDIT:
* So i've told you guys i was a total nooblet... i prove it again, i have figured it out * with the guide bdlt posted ;)
* i didn't have to make a c-script, but a console aplication :tazz:
* so i've found why my programs wouldn't spawn a new window to give the
* numbers in ;)

THX FOR ALL HELP

Tom

Edited by tom_pauwaert, 19 June 2005 - 04:42 AM.

  • 0






Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP