Question about Intel Computers & Internet

1 Answer

How to write a record with pointer variables in a file in c++

We got problem while reading & writing a record of a class which contained several character pointers in a text file using c++.
We are using turboc3 compiler
I want to know how to write & read such a record

Posted by on

1 Answer

  • Level 3:

    An expert who has achieved level 3 by getting 1000 points

    Superstar:

    An expert that got 20 achievements.

    All-Star:

    An expert that got 10 achievements.

    MVP:

    An expert that got 5 achievements.

  • Master
  • 1,263 Answers

If understand your question correctly , you don not work the pointer value but the contents the pointer is referring to.

Hope that makes sense

char* pointer = "some message";

pointer = 0x04556 *pointer = "s";

Regards
GeWiz

Posted on Jun 16, 2009

1 Suggested Answer

6ya6ya
  • 2 Answers

SOURCE: I have freestanding Series 8 dishwasher. Lately during the filling cycle water hammer is occurring. How can this be resolved

Hi,
a 6ya expert can help you resolve that issue over the phone in a minute or two.
best thing about this new service is that you are never placed on hold and get to talk to real repairmen in the US.
the service is completely free and covers almost anything you can think of (from cars to computers, handyman, and even drones).
click here to download the app (for users in the US for now) and get all the help you need.
goodluck!

Posted on Jan 02, 2017

Add Your Answer

Uploading: 0%

my-video-file.mp4

Complete. Click "Add" to insert your video. Add

×

Loading...
Loading...

Related Questions:

1 Answer

Canon eos t5: movie recording has been stopped automatically appears after only 10 sec. of recording


This could be something to do with the size and class of your memory card. You usually need a class 10 card for the higher read and write speeds.

Feb 20, 2015 | Canon Cameras

1 Answer

How can i install vista in my lenovo g550.i have installed xp priviously, but,now want to install vista in it.i have the copy of vista home premium os cd. please help me.


1. Backup all your files. Windows XP has a "Files and Settings Transfer Wizard" under System Tools under Accessories under All Program. Use it to create one (large) file -- copy that file to a DVD-recordable disk or to a USB memory-stick or to an external disk-drive.
2. Verify that you can read that file -- writing a "bad" copy would be horrific.
3. Access the LENOVO web-site -- looking for device-drivers for your model of Lenovo,
that will not be contained on the Vista CD. Download them, and save them to a CD-recordable disk (not a USB disk -- you may need these device-drivers, in order to enable the USB ports after installing Vista).
4. Insert the Vista CD. It should "autorun" something, asking your permission to start the installation of Vista.
5. Follow the on-screen prompts.
6. After the install completes, use "Windows Update" several times, to get all the security-fixes that have been issued since the release of your Vista CD.

Nov 18, 2010 | Computers & Internet

1 Answer

I not insttal java in my computer


Just go to sun.com
download jdk latest version..okay
them install it ...
after it go system properties then advanced then environment variable then

create new named path and write value "C:\Program Files\Java\jdk1.6.0\bin;"

now set your class path as named class path and value
"C:\Program Files\Java\jdk1.6.0\bin;.;"


then your java will install.

To check whether java is installed ...open notepad and write javac and hit enter .....if it gives many options then your java is installed......okay

Aug 19, 2010 | Computers & Internet

1 Answer

Differentiate between nested and inner classes.Explain with examole


best shot that can attempt, hope it helps

Nested Classes vs. Inner Classes
A nested class is a class whose definition appears inside the definition of another class, as if it were a member of the other class. For example, if a program contains class A { class B { // fields, methods of class B... } // fields, methods of class A... } then class B is a nested class of class A. Code outside of the methods of class A can refer to class B by calling it A.B, using the same dot notation as for field and method references. Within the methods of class A class B can be used without qualifying the name. B could be hidden from code outside of class A by declaring it private, just as with fields and methods.
A nested class like B is known as an inner class. An inner class has access to the fields of an instance of its enclosing class. For this reason, an instance of B can only be created in association with an instance of A, using the expression /it instanceA.new A.B(...) outside of A's methods, where instanceA is an instance of A, and
new B(...) inside of A's methods. The new instance of B also knows about the enclosing instance of A, and can refer to it using the expression
A.this We can think of an instance of an inner class as having two this pointers, one for itself and one for its enclosing instance. An inner class may be nested within another inner class, so an inner class can even have multiple levels of this pointers. A nesting depth more than one level is quite uncommon, however, and should usually be avoided.
A nested class can be declared static, in which case it has reduced access to its enclosing class. For example, if B were declared static above, it could no longer access the instance variables of A, and there would be no associated instance A.this. Static nested classes are known as nested top-level classes, because they are exactly like classes declared outside any other class, except for the way they are named. Instances of a static nested class are created using regular new, as in new A.B(...)

Jun 09, 2010 | Sun Java Programming Language (cdj-275)

1 Answer

I don?t understand the use of pointers in C++


Pointers are variables which store memory address of other variables.
It is denoted by an astrix *
Pointers and normal variables must have same data types.
Need of Pointers:
As said pointers variables store memory addresses of other variables, this can be used when we want to perform some calculations on a variable, we pass the address of this variable to the function from using pointers, thus any changes made to the variable will directly affect the variable as it is pointed to the same memory location.
It can also be for pointing various memory locations e.g. video memory. In the days of Dos we could actually read and write directly on to the video memory using address 0xB8000000 hexa decimal address.
Declaring a pointer:
int a = 10;
int *p = &a;
Here are passing address of a to p. Make sure that the data types should be same.
When we use pointers as arrays, it is much faster then the usual array iterators.
int num[] = {43,52,54,53};
int i=0, *j;
j=&num[0];
while(i<=3) { cout<<"num ["<<i<<"] = "<<*j<<endl; j++; } // This peice of code is faster than following method
for (int i=0;i<=3;++) { cout<<"num ["<<i<<"] = "<<num[i]<<endl; }
As we are directly working on memory.
Pointers are most commonly used to allocate memory dynamically, using new operator.
int *p = new [10];
This code allocates for 10 integer type array dynamically.
Dont forget to release the reserved memory using new operator by delete operator.
delete []p; // Frees the reserved memory.
This is an overview of pointers, as it requires study and practice.
Please rate. Thanks :)

May 09, 2010 | Computers & Internet

1 Answer

Computer does not recognize it as a CD RW drive


When you try to write data to an optical disc, you may experience any of the following symptoms:

* You receive various disc write error messages.
* You experience issues with the drive and the built-in recording feature of Windows XP.
* You experience issues with third-party programs that you use to write data to the disc.
* You cannot read the disc in all versions of Windows.
* You cannot read the disc, or some files on the disk, by using an MP3 player.
* When you add files or folders to a disc that already contains data, some files are lost.
* Recording files to the disc is inconsistent.
* The disc recording operation is consistently unsuccessful.

TROUBLESHOOTING

Troubleshooting specific errors
If you experience one of the following errors, follow the appropriate steps to resolve the error.

* There is no disc in the drive. Please insert a writable CD into drive.
This error can occur if the CD-R drive or CD-RW drive is not recognized as a recordable device. This error can also occur if the device driver has been corrupted. To resolve this issue, see Method 3 in the "General troubleshooting" section and Method 1 in the "Advanced troubleshooting" section.

* Drive not accessible, incorrect function
This error message typically occurs when you try to write to a CD-R or a CD-RW, and the Windows XP built-in disc recording feature does not recognize the CD drive as a recordable drive. This error message may also occur if specific third-party programs are installed. For more information about how to troubleshoot this error,

when you access the CD-ROM drive, the DVD-ROM drive, or the CD-RW drive
* Error Deleting File or Folder.
Cannot delete file name. Files on this CD-ROM drive are read-only. You cannot copy or move files over to this CD-ROM drive.

This error message can occur because individual files cannot be deleted from the CD-RW. You cannot use the CD disc recording feature of Windows XP for random-access storage while you are writing to disc.

To set the service to Automatic, follow these steps:
1. Click Start, click Run, type services.msc /s, and then click OK.
2. Double-click IMAPI CD-Burning COM Service.
3. Under Service Status, click Start.
4. Try to write data to a CD.

Jan 28, 2010 | Samsung (SH-M522C/BEBN) CD-RW/DVD-ROM...

2 Answers

The 5500 doesn't recognize the files on my ipod, which are mainly cd's impoted to itunes, so i converted all the files to MP3 but it still isn't recognizing the files. what do i do?


Actually there are 2 possible solutions to your problem. When you plug in your Ipod or USB drive into the Denon HS5500 the machine will put a file on the drive called "Denon_DJ". This file needs to be deleted each time you add new mp3's to your ipod or usb device or your new files wont be shown.
The second has to do with what type of mp3 you are using and what sample rate it was created with.
For instance I record music with my computer and keyboards. I like to record in 96KHZ because it sounds so much nicer than 44.1k. Well the Denon wont read anything created with a sample rate higher than 44.1K . I downloaded a song from a DJ friend that was recorded in 48KHZ and made into a 196k MP3 file. The Denon wouldn't play it because it is not 44.1. Check your manual or check online.. the Denon reads 44.1k 320kbs and lower files only.. (Bad Denon)
You may also want to avoid what are called Variable Bit Rate files. Most files you download online are ripped at a variable bit rate. The Denon will play variable bit rate Mp3's .. But you will not be able to save cue points or save memos to the system. I found this out the hard way. So. I took all the files I had created that were VBR and put them into Audacity with the Lame MP3 plugin and set the bitrate to 320kbs and now I can save memos.. But everytime I put the USB flash drive into my pc and put new songs on I have to delete the Denon_DJ folder.. Its sad too because thats where the HS5500 stores it's playlist files... :( Bad Denon. They should have asked me to write the software.. xD
I hope that helped you..

Apr 12, 2009 | Denon DN-HS5500 Turntable

1 Answer

Please Solve this C++ Program


Write a program to prompt the user to input several lines of input. A line of inputs is terminated by '*'. For each readline of input the program should output:(use pointer notation for the array) . The total # of words . The lenght of the longest word in the line At the end the program should output: . The total number of words read in all lines of input . The lenght of the longest word read in all lines of input

Jan 19, 2009 | Computers & Internet

1 Answer

Use vb.net and access


Imports System
Imports System.IO
Imports System.Data
Public Class SaveImage
Shared Sub main()
Dim o As System.IO.FileStream
Dim r As StreamReader
Dim gifFile As String
Console.Write("Enter a Valid .Gif file path")
gifFile = Console.ReadLine
If Dir(gifFile) = "" Then
Console.Write("Invalid File Path")
Exit Sub
End If
o = New FileStream(gifFile, FileMode.Open, FileAccess.Read, FileShare.Read)
r = New StreamReader(o)
Try
Dim FileByteArray(o.Length - 1) As Byte
o.Read(FileByteArray, 0, o.Length)
Dim Con As New _ System.Data.OleDb.OleDbConnection("Provider=Microsoft.Jet.OLEDB.3.51;Persist Security Info=False;Data
Source=Test.mdb")
Dim Sql As String = "INSERT INTO images (Pic,FileSize) VALUES (?,?)"
Dim Cmd As New System.Data.OleDb.OleDbCommand(Sql, Con)
Cmd.Parameters.Add("@Pic", System.Data.OleDb.OleDbType.Binary, o.Length).Value = FileByteArray
Cmd.Parameters.Add("@FileSize", System.Data.OleDb.OleDbType.VarChar, 100).Value = o.Length
Con.Open()
Cmd.ExecuteNonQuery()
Con.Close()
Catch ex As Exception
Console.Write(ex.ToString)
End Try
End Sub
End Class

Jul 08, 2008 | Microsoft Computers & Internet

Not finding what you are looking for?
Computers & Internet Logo

Related Topics:

89 people viewed this question

Ask a Question

Usually answered in minutes!

Top Intel Computers & Internet Experts

Tony

Level 3 Expert

2600 Answers

David
David

Level 3 Expert

778 Answers

Doctor PC
Doctor PC

Level 3 Expert

7733 Answers

Are you an Intel Computer and Internet Expert? Answer questions, earn points and help others

Answer questions

Manuals & User Guides

Loading...