Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

please can any one help me

raniarania Member Posts: 35
i develop a program that read binary files(e.g. wav file or mp3) then present the out in a dialog box
and first i make a variable outca.
in each of them i put the bytes readed from the file
char outca[10000000];
but it doesn not read all the bytes of a file(that is wanted)
i think if it is a pointer it will work but it does not by compiling it makes error
here is my source code:

#include
#include
#include
#include

Comments

  • chick80chick80 Member Posts: 349
    : char *outca;
    : extern char *outca;
    : outca=new char(fd.size);

    Why do you first declare char *outca and then redeclare it as extern???

    Anyhow the error is that you have to use [fd.size] not (fd.size)

    char *outca = new char[fd.size];

    nICO

    [hr]
    [italic]How beautiful, if sorrow had not made Sorrow more beautiful than Beauty itself.[/italic]
    JOHN KEATS


  • Justin BibJustin Bib USAMember Posts: 0

    __ // http://forcoder.org // free ebooks and video tutorials about // C++, PL/SQL, Objective-C, Delphi, C, MATLAB, Visual Basic .NET, JavaScript, Python, Java, Ruby, Visual Basic, Go, C#, Assembly, Scratch, R, Swift, Perl, PHP F#, Erlang, Lua, Hack, LabVIEW, Rust, Scala, Scheme, Kotlin, Apex, FoxPro, Julia, Bash, Logo, D, ABAP, Dart, ML, Transact-SQL, Fortran, VBScript, SAS, Awk, COBOL, Alice, Crystal, Prolog, Lisp, Clojure, Ada // _________

Sign In or Register to comment.