473,800 Members | 2,282 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

error C2065: 'Read' : undeclared identifier

1 New Member
Hi,anyone.
I using VC6++ doing project to build dll from the code and the error code undeclared identifier show, any help??
I included my code here:

Expand|Select|Wrap|Line Numbers
  1. #include "stdafx.h"
  2. #include "invertframe2.h"
  3. #include <stdlib.h>
  4. #include <stdio.h>
  5. #include "string.h"
  6. #include <io.h>
  7. #include <fcntl.h>
  8.  
  9. #ifdef _DEBUG
  10. #define new DEBUG_NEW
  11. #undef THIS_FILE
  12. static char THIS_FILE[] = __FILE__;
  13. #endif
  14.  
  15.  
  16. void getWavFile() {
  17.  
  18. unsigned char rx[240];
  19. DWORD ret_bytes;
  20.  
  21. int total_frames =0;
  22.  
  23. Read(&rx[0], 1, &ret_bytes);
  24.  
  25. Read(&rx[0], 240, &ret_bytes);    
  26.  
  27. Read(&rx[0], 16, &ret_bytes);
  28.  
  29. //syncronisation with a frame
  30. Read(&rx[0], 3, &ret_bytes);
  31.  
  32. if(rx[1]==0xFF)
  33. Read(&rx[0], 1, &ret_bytes);
  34.  
  35. if(rx[2]==0xFF)
  36. Read(&rx[0], 2, &ret_bytes);
  37.  
  38. FILE *fd;
  39. FILE *deb;
  40. long i=0;
  41. int iFrame=0;
  42. int j=0;
  43. short *ptr;
  44. int count;
  45. BOOL speech=TRUE;
  46. BOOL start=FALSE;
  47. unsigned char *buff;
  48. ptr=(short*)malloc(160);
  49. buff=(unsigned char*)malloc(240);
  50. fd=fopen("raw.bin","wb+");
  51.  
  52. while(speech){
  53.     ret_bytes=0;
  54.     while(ret_bytes!=240 && speech){
  55.     Read(&buff[iFrame*240], 240, &ret_bytes);
  56.     if(ret_bytes!=240)
  57.     j++;
  58.     else{
  59.     total_frames++;
  60.     invertFrame(buff,240, count);
  61.     memcpy(ptr,buff,160);
  62.     fwrite(buff,2,80,fd);
  63.     }
  64.  
  65.     if(j==2 || total_frames == 200)                    speech=FALSE;
  66.     }
  67. }
  68.     fclose(fd);
  69.     Raw2Wav("raw1.bin","MCU_USB1.wav",8000);
  70.  
  71. }
  72.  
Thanks and Regards,
GreatSimon
Aug 15 '07 #1
1 5182
Banfa
9,065 Recognized Expert Moderator Expert
I am not aware of any function that is called Read, did you mean to call fread?

Alternitively is it defined in another one of your source files in which case a prototype would be in order.
Aug 15 '07 #2

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

Similar topics

8
5088
by: Equilibrium | last post by:
what did I wrong with the program ? (use VC++) /* Using if statment, relational operators, and equality operators */ #include<stdio.h> int main() { printf("Enter two integers, and I will tell you\n"); printf("the relationships they satisfy: ");
4
2048
by: yanyo | last post by:
hi, im trying to figure out whats the problem with this program i get a runtime error but i dont see where the problem is i tried changing declaration but nothing if somrbody can try this on their compiler to make sure is not a compiler compatibility problem. #include<stdio.h> #include<math.h> char menu_action(void);
0
1496
by: Stephanie Doherty | last post by:
Hello World, I am trying to use a _spawnl function like this (and I have included the process.h file): _spawnl(_P_WAIT,iporgfile,iporgfile,NULL); It compiles with the following errors: error C2065: '_P_WAIT' : undeclared identifier
2
3384
by: teddybyte | last post by:
my script below is: #include "stdafx.h" int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
2
3934
by: Nick | last post by:
I'm learning C++ and ran into a compile error using Visual C++ 2005 Express on the following example program (located at http://www.cplusplus.com/doc/tutorial/templates.html): // template specialization #include <iostream> using namespace std; template <class T> class container {
25
4028
by: notahipee | last post by:
I have been trying to cin an number from 0 to 9 with a leading 0. For example 00 or 07. I was using a switch case. switch (int) { case 01: break; case 02: break;..... My problem arises at 08 and 09 because they are not octal. Is there any way to coerce the input variable to decimal despite it having a leading zero .
6
38080
by: muby | last post by:
Hi everybody :) I'm modifying a C++ code in VC++ 2005 my code snippet void BandwidthAllocationScheduler::insert( Message* msg, BOOL* QueueIsFull,
4
6026
by: VikrantS | last post by:
Hi, I am migrating code from VS 6.0 to VS2008. The Code compiles in VS 6.0 but gives the following errors when compiled in VS 2008, --- \Program Files\VC\atlmfc\include\afxcmn.inl(376) : error C2065: 'TVM_GETLINECOLOR' : undeclared identifier E:\Program Files\VC\atlmfc\include\afxcmn.inl(378) : error C2065: 'TVM_SETLINECOLOR' : undeclared identifier E:\Program Files\VC\atlmfc\include\afxcmn.inl(394) : error C2065: 'TVIF_STATEEX' :...
4
3612
by: backen | last post by:
Hi! i cant get this code to work, I get error c2065, undeclared identifier for some reason don´t really know why... this results in error C2146: syntax error : missing ';' before identifier 'Sorter' and error C2065: 'Sorter' : undeclared identifier.... furthermore, I am not sure that my sorter will work (later problem =)) And I hope here is a kind soul that can help me out =) the code: #include <iostream> #include <string>
0
9551
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10505
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10276
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10253
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10035
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9090
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5471
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5606
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4149
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.