Anyone can help me for example source code or idea to built data structure Sparse Matrix using Hash Table (by C++) Thanks your help
nhatvhm
Posts
-
How to built data structure Sparse Matrix using Hash Table?? -
How to get the fullpath from argument of my application (VS C++ 2005)?My application used to argument (with argv[1]: filename). How to get fullpath from filename via argv[1]. For example, [
myapp.exe input.txt
]. :confused: -
How to convert "D:\Documents\delay.txt" to "D:\\Documents\\delay.txt"?char *strFilePath = new char[1024];
strFilePath = "D:\Documents\delay.txt";So, how to replay('\','\\'). I'm used C language.
-
How to convert "D:\Documents\delay.txt" to "D:\\Documents\\delay.txt"?Hi all, I'm trying convert "D:\Documents\delay.txt" to "D:\\Documents\\delay.txt". Anybody can help me? Thank so much!
-
How to search data on DataGridView?Hi, everyone Now, I'm use to data paging in DataGridView. When I search data on DataGridView that is just show data in present page. I would like get all data rows of DataTable that is being data paging on DataGridView. For example: pagesize = 5, DataTable have two pages. data in 1st page:
name age
John 21
N.John 20
Nancy 20
Tomath 21
Jan 22and data in 2nd page:
name age
Jany 20
Alpha 21
Don 22
Bony 20
Tomy 22One-page is present page. I'm beginning search data at "name" column as 'Tom'. It is just show one row in DataGridView. This data is correct when it show two rows in DataGridView. That is all. Did the way solve this problem? Can anyone help me?:confused:
-
How to search data on DataGridView that is being data paging? [modified]Now, I'm use to data paging in DataGridView. When I search data on DataGridView that is just show data in present page. Have the way solve this problem? I would like get all data rows of DataTable that is being data paging on DataGridView. For example: pagesize = 5, DataTable have two pages. data in 1st page:
name age
John 21
N.John 20
Nancy 20
Tomath 21
Jan 22and data in 2nd page:
name age
Jany 20
Alpha 21
Don 22
Bony 20
Tomy 22One-page is present page. I'm beginning search data at "name" column as 'Tom'. It is just show one row in DataGridView. This data is correct when it show two rows in DataGridView. That is all. Can anyone help me?:confused:
modified on Wednesday, September 10, 2008 7:04 PM
-
Differently another way to set value for element in XML?Great! Thank you so much :)
-
Differently another way to set value for element in XML?Hi , Recently i tried to get an xml file that contains many element with no values and set their values.
<Book>
<Auther>
<Name></Name>
<Age></Age>
</Auther>
<Publicity>
<Year></Year>
</Publicity>
</Book>this xml Element elements has no values and i want to set their values and save the xml string to file.I used to ...
mNodeChild = mDoc.CreateElement("Name");``mNodeChild.Value="John";
. Although, this line code is correct syntax. But when this program write to XML file that is message announcement {Cannot set a value on node type 'Element'} do someone knows how to do it? -
How to convert one byte to string?In MSDN guide convert array bytes to string, here code:
Encoding.UTF8.GetString(byte[] bytes)
VS2005 doesn't support convert one byte to string. Anybody can I help me? or for example how to convert one byte to string. Although, may be use toConvert.ToString(byte)
is correct, but I don't think so. Except, differently another way Thank one so much!!!! -
How to get another DataTable from original DataTable?I think you mistake and omit line
dt = data.Clone()
beforeforeach(DataRow dr in data.Rows)
-
How to get another DataTable from original DataTable?I think of my explain very clearly for you. anyway, thank you so much. I get it and i get answer, have a good day!
-
How to get another DataTable from original DataTable?Exactly, I think so,
-
How to get another DataTable from original DataTable?Here, it is source code
public DataTable SearchField(string strSearch, string strFieldName)
{
DataTable dt = new DataTable();foreach (DataRow dr in data.Rows) { string strT = dr\[strFieldName\].ToString(); if (stringSearchMP(strSearch, strT) != -1) { DataRow row = dr; dt.ImportRow(row); } } return dt; }
I don't know to cause why my function return null. Because,
DataGridView.DataSource = dt
can't show data. Anyone help me?:confused: Anyway, thanks so much!!! -
Make virtual method in my project//*****************************Main Program ******************************
#include #include #include #include "ReadWrite.h" #include "Graph.h" void main(int doiso, char *thamso[]) { GRAPH G; int rf=G.ReadData(thamso[1]); if(!rf) printf("Khong doc duoc file!\n"); else { printf("Doc duoc file!\n"); G.GraphAlgorithm(); int wf=G.WriteData(thamso[2]); if(wf) printf("Ghi file thanh cong!"); } getch(); }
//******************************Graph.cpp*********************************#include #include #include "Graph.h" int GRAPH::ReadData(char *FileName) { FILE *fp=fopen(FileName,"rt"); if(!fp) return 0; fscanf(fp,"%d",&n); B=new unsigned char *[n]; unsigned char *temp=new unsigned char [n]; for(int d=0; d //***********************Graph.h************************************** `class GRAPH { private: int n; int label; int *LabelLT; unsigned char **B; public: int ReadData(char *FileName); const int WriteData(char *FileName); void GraphAlgorithm(); void Visit(int i); };` Help me, make virtual method in my project! <(-|-)> "To be or not to be"