473,394 Members | 1,761 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Return type is an incomplete type

Expand|Select|Wrap|Line Numbers
  1. #include <stdlib.h>
  2. #include <stdio.h>
  3. #include <SDL/SDL.h>
  4. #include <SDL/SDL_ttf.h>
  5.  
  6. TTF_Font Init_Font()
  7. {
  8.   TTF_Font *police = NULL;
  9.  
  10.   TTF_Init();
  11.   if(TTF_Init() == -1)
  12.     {
  13.       fprintf(stderr, "Erreur d'initialisation de TTF_Init : %s\n", TTF_GetError());
  14.       exit(EXIT_FAILURE);
  15.     }
  16.  
  17.   police = TTF_OpenFont("Data/lcd.ttf", 15);
  18.   if (police == NULL)
  19.     {
  20.       fprintf(stderr, "Impossible de charger Data/lcd.ttf");
  21.       exit(EXIT_FAILURE);
  22.     }
  23.   else
  24.     return police;
  25. }
I just want to initialise a font thanks to SDL_ttf bu can't...
Thanks for help
Dec 30 '09 #1
1 4385
Omg fixed.
Simply changed the function into TTF_Font * Init_Font()
and return NULL instead of exit(EXIT_FAILURE).
;).
Sorry for disturbing ^^
Dec 30 '09 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Varun | last post by:
Hi There, I have a form("myRequest.asp") and the values from it are retrieved into the page ("output_Print.asp") on which I have two buttons('Save As Complete' and 'Save As Incomplete'). When the...
7
by: Andrew Ward | last post by:
Hi All, Considering the following code: struct A; struct B { std::list<A> l; };
6
by: Eric Smith | last post by:
Is a structure containing an incomplete array as its last element (per paragraph 2 of section 6.7.2.1 of ISO/IEC 9899:1999 (E)) itself an incomplete type? That appears to be indicated by paragraph...
51
by: jacob navia | last post by:
I would like to add at the beginning of the C tutorial I am writing a short blurb about what "types" are. I came up with the following text. Please can you comment? Did I miss something? Is...
6
by: S.Tobias | last post by:
I'm trying to understand how structure type completion works. # A structure or union type of unknown # content (as described in 6.7.2.3) is an incomplete type. It # is ...
2
by: Halid Umar A M | last post by:
Dear All, Please tell me why this error is occuring. The following is the code snippets which i have typed. struct mystructure{ struct list_head m; //error: field m has incomplete...
2
by: gk245 | last post by:
I have something like this: #include <stdio.h> #include <ctype.h> #include <strings.h> struct sentence get_sentence (char string) { struct sentence my_sentence {
3
by: massysett | last post by:
Greetings, Having classes with member objects that have STL containers of objects whose definitions are incomplete results in undefined behavior. See for example: ...
10
by: arcadio | last post by:
Hi everyone, I'm currently struggling to compile a large piece of legacy code. GCC 3.3 compiles it without complaining, but GCC 4.2.3 (the default in Debian) refuses it and signals "several...
34
by: Davy | last post by:
Hi all, I am writing a function, which return the pointer of the int. But it seems to be wrong. Any suggestion? int * get_p_t(int t) { return &t; } int main()
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.