|
I believe HtmlTidy[^] can do that.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
dear all
any problem occurred when the following errers happened?
: error C2057: expected constant expression
thanks
Li Zhiyuan
5/10/2006
|
|
|
|
|
Well, the error message is clear enough no ? It says that somewhere the compiler expects a constant variable but you didn't provide it.
And without any piece of code, it is impossible to tell more.
|
|
|
|
|
hi;
most likely you have declared an array without indicating its size
e.g long m_lStudents[];
if thats the case then give it size;
|
|
|
|
|
Is this question related to your previous question?
|
|
|
|
|
no, this is what i just studied for dynamic multiple array...the code is here....
nt n,m;
double c[n][m] = NULL;
double * a[] = NULL;
double * b[] = NULL;
cin >> n;
cin>>m;
b[] = new double[m];
a[] = new double[n];
for (int i=0; i>>n; i++)
{
a[i] =(double) rand()/RAND_MAX;
}
for (int j=0; j<m; j++)<br="" mode="hold">{
a[j] =(double) rand()/RAND_MAX;
}
for (int k=0;k<m;k++)>
for (int kk=0;kk<n;kk++)>
{
if (k==0)
c[k][kk] = a[k];
else
c[k][kk] = b[kk];
}
cout <<"\n";
delete [] a;
a = NULL;
}
this is what i created a 2 D dynamic array...but the problem is there...how to create a 2D dynamic array?
thanks
Li Zhiyuan
5/10/2006
|
|
|
|
|
li zhiyuan wrote: how to create a 2D dynamic array?
Simple answer... You can't. Which is why you're getting an error.
Longer answer... You cheat. Create a one dimensional dynamic array. But make it an array of double * s, then create those arrays.
typedef double *pdouble;
pdouble *c = new pdouble [N];
for (n = 0; n < N; n++)
c [n] = new double [m];
.... ; do your processing code
for (n = 0; n < N; n++)
delete [] c [n];
delete [] c;
Notice I'm using delete [] instead of delete . The [] means it will call the destructor for each member of the array(s). For simple types like double and double *, it makes no difference. But it makes no harm, and is a good habit to get into. Then you can make arrays of classes/structs that *could* have destructors, and you'll be thankful for your good habits.
I hope that helped,
Iain.
ps, In addition, please use the <pre> / </pre> keywords in your posts. And longer variables. They're hard to read now, and you're going to hate yourself in two years time.
|
|
|
|
|
thanks a lot friend, could you provide me with complete code creating 2 D dynamic array? thanks again
Li Zhiyuan
|
|
|
|
|
I already did provide you with complete code for creating a 2d array, and then destroying it.
Look at the post you replied to.
|
|
|
|
|
Please remove your blinders.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
can anybody tell me how to fetch the value of a column in a particular row in the list control when i click anywhere on the row.
i tried out this way
TCHAR pszText[_MAX_PATH]
LVITEM lvi={0};
lvi.mask=LVIF_Text;
lvi.pszText=pszText
lvi.cchTextMax=_MAX_PATH
lvi.iItem=0;
lvi.iItem=xc;
listctrl.sendMessage(Lvm_GETITEM,(WPARAM)0,(LPARAM)(LPLVITEM)&lvi)
but by using this code i am only able to fetch the first column value where as i want to fetch either the second or third column value.
thanks in advance
|
|
|
|
|
|
Hi all,
I have write a small server application using C++. Now I want to automated this. Say I want to start the server at 12.00p.m.
So I try to write a .Net service. But it is really new stuff for me. So from where I start this. I got this idea from the Visual Studio .Net 2003, creating new project dialog box searching.
I appreciate your help all the time...
Eranga
|
|
|
|
|
It seems StretchBlt() function stretches big size images fit to destination rect of smaller, but it shows small images as such if destination rect is bigger than source rect. How to stretch the small images to fit in big control? Is there any property for the DC for this?
Best Regards,
Suman
|
|
|
|
|
It should stretch it if you destination width/height are larger than the source width/height, you just have to make sure your destination dc (hdcDest) is created with the right dimensions. Can you post your code?
- S
50 cups of coffee and you know it's on!
|
|
|
|
|
plz tell how can play .dat files with the use of MCIWnd?
|
|
|
|
|
For play .dat files you can use of DirectX.did you can play other formats like avi,mpeg or no?
|
|
|
|
|
in my project i m using MCIWnd for playing audio and video files.
avi,mpeg,and wmv formats are play well but for dat files it gives an error.
so plz tell me how can i play .dat files in MCIWnd and how can read and write .dat and .avi files?
thanks
|
|
|
|
|
v.j wrote: avi,mpeg,and wmv formats are play well
So I think you must use of DirectX for show dat.
|
|
|
|
|
hi all,
I'm using List control for displaying the data from database in my MFC dialog box. Along with the database data, i have been using the first coloumn for serial number. After displayin all these information i want access the second coloumn from the list control.
Can anybody tell me how to access the second column of List control
thanks in advance
||SnAkeBed||
|
|
|
|
|
LVITEM has some members for it iItem,iSubItem.
int InsertItem(
const LVITEM* pItem
);
|
|
|
|
|
SnaKeBeD wrote: Can anybody tell me how to access the second column of List control
Subitem = 1
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hi,
I am using VS 2005 team edition to build a DLL and lib with with exports
My question is the following first
1) can I direct the .DLL and .LIB to 2 different directories ???
2) How do I sepcfiey this by this I mean in VS Property-->Linker-->General-->Output file
I have the Follwing Values $(OutDir)\$(ProjectName).dll
First seems like this points to where .dll is created how about the .lib .exp etc I guess it ends up in the same place can I create the .dll in place and the .lib in other directory
Second where are these ($OutDir) and $(ProjectName) variables set and can change them to point them to go to a different directory
|
|
|
|
|
ForNow wrote: 1) can I direct the .DLL and .LIB to 2 different directories ???
DLL path : VS Property-->Linker-->General-->Output file
lib path : VS Property-->Linker-->Advanced->Import Library
ForNow wrote: Second where are these ($OutDir) and $(ProjectName) variables set and can change them to point them to go to a different directory
OutDir : Vs Property->General->Ouput Directory
ProjectName: name of your VS project
|
|
|
|
|
Thankx
My next questions is the names in the Pane(s) $targetdir/$targetname/$outdir/$Projectname how can set thier values
Thankx
|
|
|
|