473,320 Members | 2,124 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,320 software developers and data experts.

error C4430: missing type specifier - int assumed. Note: C++ does not...

1
error C4430: missing type specifier - int assumed. Note: C++ does not support default-int.

That´s the answer I get when program is compiled. How can I fix that error?

Here you have the .cpp file, so it´ll be easier for you to help!


extern "C"
{

#include <libavcodec/avcodec.h>
#include <libavformat/avformat.h>

#include <libswscale/swscale.h>
#include "libavcodec/opt.h"

}

#include <string>
#include <SDL.h>
#include <SDL_thread.h>

_
#undef main /* Prevents SDL from overriding main() */


#include <stdio.h>
#include <math.h>

#define SDL_AUDIO_BUFFER_SIZE 1024

#define MAX_AUDIOQ_SIZE (5 * 16 * 1024)
#define MAX_VIDEOQ_SIZE (5 * 256 * 1024)

#define FF_ALLOC_EVENT (SDL_USEREVENT)
#define FF_REFRESH_EVENT (SDL_USEREVENT + 1)
#define FF_QUIT_EVENT (SDL_USEREVENT + 2)

#define VIDEO_PICTURE_QUEUE_SIZE 1

typedef struct PacketQueue {
AVPacketList *first_pkt, *last_pkt;
int nb_packets;
int size;
SDL_mutex *mutex;
SDL_cond *cond;
} PacketQueue;


typedef struct VideoPicture {
SDL_Overlay *bmp;
int width, height; /* source height & width */
int allocated;
} VideoPicture;

typedef struct VideoState {

AVFormatContext *pFormatCtx;
int videoStream, audioStream;
AVStream *audio_st;
PacketQueue audioq;
uint8_t audio_buf[(AVCODEC_MAX_AUDIO_FRAME_SIZE * 3) / 2];
unsigned int audio_buf_size;
unsigned int audio_buf_index;
AVPacket audio_pkt;
uint8_t *audio_pkt_data;
int audio_pkt_size;
AVStream *video_st;
PacketQueue videoq;

VideoPicture pictq[VIDEO_PICTURE_QUEUE_SIZE];
int pictq_size, pictq_rindex, pictq_windex;
SDL_mutex *pictq_mutex;
SDL_cond *pictq_cond;

SDL_Thread *parse_tid;
SDL_Thread *video_tid;

char filename[1024];
int quit;
} VideoState;

SDL_Surface *screen;

/* Since we only have one decoding thread, the Big Struct
can be global in case we need it. */
VideoState *global_video_state;



Any help is very appreciated!
Thanks in advance.
Dec 17 '10 #1
1 6989
weaknessforcats
9,208 Expert Mod 8TB
Default-int comes from C where if you don't declare the return type of a function then int is assumed. C++ does not allow that assumption. Check your functions and function prototypes and be sure that they all have a declared return type.
Dec 17 '10 #2

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

Similar topics

3
by: John | last post by:
Hi, I am working on a legacy code. Following is a line of the code which complies with Visual C++.NET 2003 but not with Visual C++ 2005: for ( int i = 0; i < (const)(X.size()); i++ ) {}// X is...
0
by: Jigar.Patel | last post by:
I have simple remoting server exposing following simple method. When I try to add webreference to this server in another project by serveraddresss?wsdl, it gives me following error: Custom tool...
2
by: darko | last post by:
ok, i'm just starting out, with c++ and i downloaded some wideos, i'm working on VS.NET 2005, and hthe first script is helloworld #include <iostream> main() { std::cout << "Hello World"; }...
1
by: Bit Byte | last post by:
The following function pointer declarations used to compile without any problems in VS7.1, now when I try to compile in VS8, I get a C4430 error. Anyone knows why, and how to fix it (without using...
0
by: Ole Nielsby | last post by:
The C++ syntax goes like: type-id: type-specifier-seq abstract-declarator(opt) type-specifier-seq: type-specifier type-specifier-seq(opt) which means, a type-id has 1 or more...
2
by: im2cre8iv | last post by:
Here is my code where I am receiving the error: #include <fstream> #include "BinaryTree.h" using namespace std; Node* BinaryTree::MakeTree(ifstream& infile) { char name; infile>>name;
1
by: pra1983 | last post by:
can any one can help i am getting an error saying "missing type specifier - int assumed in line 332" but my line of that part are.... 332: getchar(); 333: getchar(); 334: for( i=0 ;...
12
by: slizorn | last post by:
error C4430: missing type specifier - int assumed. Note: C++ does not support default-int err how do i fix that error? for example given to this section of code.. Matrix::addMatrix(Matrix m1,...
1
by: ornit | last post by:
What caused this error: c4430?
1
by: Dean Evans | last post by:
Hi, This is my first OOP in C++ and having lots of probs. Below is an abstract class for an abstract factory problem. I get the compiler error as shown in the heading. Thanks for any tips ...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.