- Strength to Increase Rep
- +4
- Strength to Decrease Rep
- -1
- Upvotes Received
- 16
- Posts with Upvotes
- 11
- Upvoting Members
- 11
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
Re:
Hi I'm looking to upload files using http post using winsock and have a php script handle it. I've got it working fine for text files but with files that contain null characters such as exes it doesn't work. It is only copying the file buffer up to the null … |
|
Re:
I've been working on getting the Big-Oh notation for this code segment a couple days now and I can't figure it out. I've most likely come across the right answer but I can't convince myself it's right. What's the Big-Oh notation for the following code and how do you arrive … |
|
Re:
I've written a C# app in Visual Studio 2008 C# Windows forms which fetches the text html from a webpage and it works fine in most cases. I needed the multipart/form data, as the main interest is sending text queries back and forth from a test server in Visual Studio. … |
|
Re:
Hi !!! I have one problem! I use StreamWriter to send (object) stream to server (not string). But how to read this object with StreamReader ??? The server who send stream (object): [CODE]private void SomeMethod(SqlDataReader reader) { string column = "ColumnName"; object stream = ReadFromDB(reader, column); SendStream(stream); } public object … |
|
Re:
I am new to this site, but is there anyone out there who could point me in a different direction. I am trying to get the "Knights Tour" to work. The issue that I am having is that it seems to print several number twice. |
|
Re:
I just learned about heaps today. It looks like STL wants you to create a heap by first creating a vector, then using make_heap from <algorithm>: [code] std::vector<SimpleClass> Numbers(8); // ... populate ... // convert Numbers into a heap make_heap(Numbers.begin(), Numbers.end()) ; [/code] Why is there not a <heap> just … |
|
Re:
i needed to write a simple program to demonstrate the CRC mechanism in Networks. i needed a string of bools to be XORed with the polynomial. Well, i used <bitset> but that did not help much. So i just used a bool vector. This is how i proceeded. Here, when … |
|
Re:
hello guys...i have a LPTSTR variable and I want to show that on console how do I do that..Here is what I have but, off course it does't work..if it is tooo simple question, plz excuse me...thanx [code=c] lpszDevName = (LPTSTR)((LPBYTE)lineDevCaps + lineDevCaps->dwLineNameOffset); printf("%s",lpszDevName); [/code] |
|
Re:
I m searching for a library for filling forms, and click buttons. in C++ , linux or windows. Thanks. |
|
Re:
I have a curius problem with my bitmap writing function, it takes a char array and writes a 24 bit BGR bitmap. It was working fine using an array captured from a camera, I printed out the content of the first couple of bytes: 132 135 131 132 135 131 … |
|
Re:
can anyone tell me why this would freeze? I'm trying to find a way to terminate a thread from outside of it, and allow the main program to do garbage cleanup, like closing any HANDLEs used or freeing any memory allocated. I trigger an event which should cause that loop … |
|
Re:
I am trying to implement the A* algorithm in C++ ([url]http://en.wikipedia.org/wiki/A*_search_algorithm[/url]). The pseudocode i am trying to implement is: [code]function A*(start,goal) closedset := the empty set // The set of nodes already evaluated. openset := set containing the initial node // The set of tentative nodes to be evaluated. g_score[start] … |
|
Re:
I am creating a winsocket app & want to know that if there's a method available to fetch the Dynamic IP of the local machine & not it's local address. For eg: my local address may state 192.168.1.3 but my dynamic IP is depedent on my ISP location like 59.114.25.10 … |
|
Re:
I'm having difficulty using reinterpret_cast. Before I show you my code I'll let you know what I'm trying to do. I'm trying to get a filename from a vector full of data being used by a MIPS I processor I designed. Basically what I do is compile a binary from … |
|
Re:
Hello guyz !!! I came across this problem and I am still unable to come up with a good algorithm to solve this problem Problem : given, 1<=n<=1000000, and 1<=k<=9 , calculate the first and last k digits of n^n. for example if n=13 and k=4, then result : first … |
|
Re:
Hey everybody, I am currently having difficulty using GetOpenFileName() and GetSaveFileName(). The keeps returning the error " undefined reference to `_GetOpenFileNameA@4' ". I can't seem to find a fault in my code, so is it the compiler or is it the code? I am using CodeBlocks. [CODE]void DoFileOpen(HWND hwnd) { … |
|
Re:
Hello everybody, I am currently developping a GUI interface game for windows XP. I am currently having difficulty changing the background of a EDIT box created with CreateWindowEx(). It's default background is white (which is the color I want). But the user is not supposed to be able to adjust … |
|
Re:
I have recently started to write my own tiny little electronic-book. This e-book is not about teaching C++ from ground up, but it is a collection of C++ pieces that I have learnt during these past few years that I want to share with everyone. I call this e-book "[B][I]C++: … |
|
Re:
Hi I've been having problems retrieving a webpage using HTTP GET in winsock. I used a packet sniffer to construct the header and the GET Request appears fine although I receive a "400 Bad Request Error". Thanks if you can help. Ricky My code: [CODE] int HTTP_GET() { WSADATA wsa; … |
|
Re:
I am using MS SAPI (5.1 or 5.3) to read a script using a call like this (in MS VC++): [CODE]Voice -> Speak(script.AllocSysString(), SPF_DEFAULT, NULL);[/CODE] I want to be able to limit the total duration of the time spent reading the text to length X (hard limit). Is there a … |
|
Re:
Hi everyone. We were given a homework to code a hash table. The objects and their members were given by our professor and we were only supposed to implement the functions (Add, Remove, Contains and Print), so I shouldn't change the objects. I should also do a copy constructor and … |
|
Re:
I need to figure out the execution time of the following algorithm in terms of n. x=2 while (x < n) { x=2^x } I think it is O(log n) but just wanted to get some confirmation to make sure I am approaching this correctly. Thanks. |
|
Re:
Hello all I have a problem.I am trying to convert 'System:tring ^' to 'const char *' but i don`t know how. can some one please help me? I use VC++ 2005 I need to open files with extension .wav my code is: [CODE] public:System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) { OpenFileDialog … |
|
Re:
I have a little spoky problem here. I really cant understand what it is. I am reading a file that is completely empty. But still the second MessageBox is showing this string: "22" I cant wrap my head around why if( line != "" ) is executing and no character … |
|
Re:
[CODE] sendfile(string path) { int length; char buffer[10]; ifstream in(path.c_str() , ios::binary); in.seekg(0 , ios::end); length = in.tellg(); in.seekg(0 , ios::beg); stringstream infofile; string name = splitname(path); infofile <<"info" << " " << name << " " << length; string infoBuffer = infofile.str(); send(infoBuffer); while(!in.read(buffer , 1).eof()) { cout <<::send(sock … |
|
Re:
Hey all, I'm trying to do some ray intersection detection but I'm having some problems. My app starts by loading a cube object into a .x file. I have a player class and a target class that both use the same model, but each has it's own world matrix. [CODE]D3DXMATRIX … |
|
Re:
My program keeps crashing and I can't see why, if I remove the line [code=php] myfile << data_[i+ndim_*j] << " "; [/code] then it runs OK...but can't see anything wrong with this line? [code=php] void Matrix::WriteToFile(std::string fname) const { ofstream myfile; myfile.open ( (fname+".txt").c_str() ); for (int i = 0; … |