Runtime error while using different font styles using graphics.h in turbo c++
up vote
-1
down vote
favorite
Recently I made a program in turbo c++ in which I am using the graphics.h library for some basic things like changing font style and drawing shapes. I used the settextsyle()
to change the font styles and outtextxy()
to output the required text.
The program runs without any problem for sometime and displays all of different fonts correctly but after some time it automatically changes all the used text to the default font style.
While searching online I found that everytime a program uses a different font style other than the default one, its file has to be loaded and that if I have to use different font styles frequently I should link their font files to my program. I think that this might be the reason for the error I am getting while running the program. I also found that I have to use the registerbgifont()
to register the used font but first I have to link the font files to c++ program but I am not able to get any clear information on how to do that.
Is this the correct reason for the error? If yes, then how can I correct it?
c++ turbo-c++ bgi
|
show 5 more comments
up vote
-1
down vote
favorite
Recently I made a program in turbo c++ in which I am using the graphics.h library for some basic things like changing font style and drawing shapes. I used the settextsyle()
to change the font styles and outtextxy()
to output the required text.
The program runs without any problem for sometime and displays all of different fonts correctly but after some time it automatically changes all the used text to the default font style.
While searching online I found that everytime a program uses a different font style other than the default one, its file has to be loaded and that if I have to use different font styles frequently I should link their font files to my program. I think that this might be the reason for the error I am getting while running the program. I also found that I have to use the registerbgifont()
to register the used font but first I have to link the font files to c++ program but I am not able to get any clear information on how to do that.
Is this the correct reason for the error? If yes, then how can I correct it?
c++ turbo-c++ bgi
2
Start by using a compiler that's not 25 years obsolete and that will work on modern OSes and accept standard C++?
– Shawn
Nov 22 at 9:45
Recently I made a program in turbo c++ in which I am using the graphics.h library From this, things start to go wrong. Turbo C++ is as old as BGI graphics. There are much better alternatives today (for free): like e.g. gcc and SDL.
– Scheff
Nov 22 at 9:45
The program I am creating is for a project I have to submit in school where I am taught using turbo c++. So, I am forced to use turbo c++ even when I know its really old and difficult to work with.
– Jasmeet singh
Nov 22 at 9:48
2
I'm afraid, changing the school or, at least, the course is not an option? ;-)
– Scheff
Nov 22 at 9:49
Did you try google "link bgi to executable"? This brings plenty of hits and might provide a clue.
– Scheff
Nov 22 at 9:52
|
show 5 more comments
up vote
-1
down vote
favorite
up vote
-1
down vote
favorite
Recently I made a program in turbo c++ in which I am using the graphics.h library for some basic things like changing font style and drawing shapes. I used the settextsyle()
to change the font styles and outtextxy()
to output the required text.
The program runs without any problem for sometime and displays all of different fonts correctly but after some time it automatically changes all the used text to the default font style.
While searching online I found that everytime a program uses a different font style other than the default one, its file has to be loaded and that if I have to use different font styles frequently I should link their font files to my program. I think that this might be the reason for the error I am getting while running the program. I also found that I have to use the registerbgifont()
to register the used font but first I have to link the font files to c++ program but I am not able to get any clear information on how to do that.
Is this the correct reason for the error? If yes, then how can I correct it?
c++ turbo-c++ bgi
Recently I made a program in turbo c++ in which I am using the graphics.h library for some basic things like changing font style and drawing shapes. I used the settextsyle()
to change the font styles and outtextxy()
to output the required text.
The program runs without any problem for sometime and displays all of different fonts correctly but after some time it automatically changes all the used text to the default font style.
While searching online I found that everytime a program uses a different font style other than the default one, its file has to be loaded and that if I have to use different font styles frequently I should link their font files to my program. I think that this might be the reason for the error I am getting while running the program. I also found that I have to use the registerbgifont()
to register the used font but first I have to link the font files to c++ program but I am not able to get any clear information on how to do that.
Is this the correct reason for the error? If yes, then how can I correct it?
c++ turbo-c++ bgi
c++ turbo-c++ bgi
edited Nov 23 at 8:45
Spektre
29k645206
29k645206
asked Nov 22 at 9:42
Jasmeet singh
1
1
2
Start by using a compiler that's not 25 years obsolete and that will work on modern OSes and accept standard C++?
– Shawn
Nov 22 at 9:45
Recently I made a program in turbo c++ in which I am using the graphics.h library From this, things start to go wrong. Turbo C++ is as old as BGI graphics. There are much better alternatives today (for free): like e.g. gcc and SDL.
– Scheff
Nov 22 at 9:45
The program I am creating is for a project I have to submit in school where I am taught using turbo c++. So, I am forced to use turbo c++ even when I know its really old and difficult to work with.
– Jasmeet singh
Nov 22 at 9:48
2
I'm afraid, changing the school or, at least, the course is not an option? ;-)
– Scheff
Nov 22 at 9:49
Did you try google "link bgi to executable"? This brings plenty of hits and might provide a clue.
– Scheff
Nov 22 at 9:52
|
show 5 more comments
2
Start by using a compiler that's not 25 years obsolete and that will work on modern OSes and accept standard C++?
– Shawn
Nov 22 at 9:45
Recently I made a program in turbo c++ in which I am using the graphics.h library From this, things start to go wrong. Turbo C++ is as old as BGI graphics. There are much better alternatives today (for free): like e.g. gcc and SDL.
– Scheff
Nov 22 at 9:45
The program I am creating is for a project I have to submit in school where I am taught using turbo c++. So, I am forced to use turbo c++ even when I know its really old and difficult to work with.
– Jasmeet singh
Nov 22 at 9:48
2
I'm afraid, changing the school or, at least, the course is not an option? ;-)
– Scheff
Nov 22 at 9:49
Did you try google "link bgi to executable"? This brings plenty of hits and might provide a clue.
– Scheff
Nov 22 at 9:52
2
2
Start by using a compiler that's not 25 years obsolete and that will work on modern OSes and accept standard C++?
– Shawn
Nov 22 at 9:45
Start by using a compiler that's not 25 years obsolete and that will work on modern OSes and accept standard C++?
– Shawn
Nov 22 at 9:45
Recently I made a program in turbo c++ in which I am using the graphics.h library From this, things start to go wrong. Turbo C++ is as old as BGI graphics. There are much better alternatives today (for free): like e.g. gcc and SDL.
– Scheff
Nov 22 at 9:45
Recently I made a program in turbo c++ in which I am using the graphics.h library From this, things start to go wrong. Turbo C++ is as old as BGI graphics. There are much better alternatives today (for free): like e.g. gcc and SDL.
– Scheff
Nov 22 at 9:45
The program I am creating is for a project I have to submit in school where I am taught using turbo c++. So, I am forced to use turbo c++ even when I know its really old and difficult to work with.
– Jasmeet singh
Nov 22 at 9:48
The program I am creating is for a project I have to submit in school where I am taught using turbo c++. So, I am forced to use turbo c++ even when I know its really old and difficult to work with.
– Jasmeet singh
Nov 22 at 9:48
2
2
I'm afraid, changing the school or, at least, the course is not an option? ;-)
– Scheff
Nov 22 at 9:49
I'm afraid, changing the school or, at least, the course is not an option? ;-)
– Scheff
Nov 22 at 9:49
Did you try google "link bgi to executable"? This brings plenty of hits and might provide a clue.
– Scheff
Nov 22 at 9:52
Did you try google "link bgi to executable"? This brings plenty of hits and might provide a clue.
– Scheff
Nov 22 at 9:52
|
show 5 more comments
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53427937%2fruntime-error-while-using-different-font-styles-using-graphics-h-in-turbo-c%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53427937%2fruntime-error-while-using-different-font-styles-using-graphics-h-in-turbo-c%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
2
Start by using a compiler that's not 25 years obsolete and that will work on modern OSes and accept standard C++?
– Shawn
Nov 22 at 9:45
Recently I made a program in turbo c++ in which I am using the graphics.h library From this, things start to go wrong. Turbo C++ is as old as BGI graphics. There are much better alternatives today (for free): like e.g. gcc and SDL.
– Scheff
Nov 22 at 9:45
The program I am creating is for a project I have to submit in school where I am taught using turbo c++. So, I am forced to use turbo c++ even when I know its really old and difficult to work with.
– Jasmeet singh
Nov 22 at 9:48
2
I'm afraid, changing the school or, at least, the course is not an option? ;-)
– Scheff
Nov 22 at 9:49
Did you try google "link bgi to executable"? This brings plenty of hits and might provide a clue.
– Scheff
Nov 22 at 9:52