c++ double quotes
--------------------------------------------------------------------------------
Hey I'm trying to read a double quoted string from a file
and then tring to write it to the file within double quotes how do I do it"
ifstream myfile("test.tx t");
ofstream myfile("test1.t xt");
text file is like this
"1 91 2" 49 1 ...
User Profile
Collapse
-
c++ double quotes
Hey I'm trying to read a double quoted string from a file
and then tring to write it to the file within double quotes how do I do it"
ifstream myfile("test.tx t");
ofstream myfile("test1.t xt");
text file is like this
"1 91 2" 49 1
"1 91 20" 49 1
How do I get that string in the double quotes as string and the 49 and 1 as integers?... -
I couldnt' get that can you write the whole code row for the malloc? where should I write that? I have the array for triangle ppt, and this one has a pointer to point or to line such as *ptrs[3], *ptrline[3] -
for(int i=0;i<=NTriangl e-1;i++)
{
for(int k=0;k<=2;k++)
{
ppt[i].pneightri[k]=NULL;
ppt[i].ptrs[k]=NULL;
ppt[i].ptrline[k]=NULL;
ppt[i].c=NULL;
}
pneightri[3],ptrs[3], ptrline[3] are pointers defined in triangle class header file
center *c;
point *ptrs[3];
line *ptrline[3];
triangle *pneightri[3];...Leave a comment:
-
Null Pointers
Hi,
I have 3 classes Point Line and Triangle
I have a handle in triangle to point as *ptrs[3].
I'm trying to check if a class pointer or even a triangle is assigned already or not but it gives me error that the memory is not allocated,so it says you did not define that triangle How can I correct this by using Null Pointer.
triangle *t=new triangle[10];
I WANT TO CHECK if (triangle[0].ptrs[0] exists)... -
Pointers to classes and handles && Null pointer
Hi,
I have 3 classes one of them is Point the other is line and the last one is triangle
I'm trying to read the output of a mesh generator program.
When I create the points and set the points with a constructor ;
point::point(in t listnumber,doub le x1, double y1,double z1)
{
x=x1;
y=y1;
z=z1;
plist=listnumbe r;
}
and then I define handles in line and triangle...
No activity results to display
Show More
Leave a comment: