15,300 Posted Topics

Member Avatar for Gigs_

[QUOTE=Gigs_;260616]HI, I have exe file writen in c++ or c and wanna decompile it to source code. Is that possible? If it is, is there any decompilet that can do that? thanks![/QUOTE] No, it is not possible to decompile back to C. The best you can do is get the …

Member Avatar for Salem
0
9K
Member Avatar for Nicklorion

There are probably several ways to do it, but I would use the string search feature of std::string class [code] std::string line = "<FILE_NAME>Testfile.dat</FILE_NAME>"; std::string filename; size_t pos; if( (pos = line.find("<FILE_NAME>") > string::npos) { filename = line.substr(pos+11); // truncate the </FILE_NAME> tag pos = filename.find('<'); filename = filename.substr(0, pos); …

Member Avatar for Nicklorion
0
148
Member Avatar for LucyB

>>A loop and a decision perhaps? something similar to this? I know its not exactly what LucyB wants, but google for "flow charts" and you will find other examples.

Member Avatar for Salem
0
91
Member Avatar for oblivion4

>>What am I missing? You are missing WinProc() function as explained in the error message.

Member Avatar for oblivion4
0
160
Member Avatar for clutchkiller

>>if( kbSize == 2000 || 3000 || 4000 || 5000); There are several things wrong with the above statement: 1) the semicolon at the end makes it a do-nothing statement. 2) it should be formatted like this: [icode]if( kbSize == 2000 || kbSize == 3000 || kbSize == 4000 || …

Member Avatar for clutchkiller
0
71
Member Avatar for andyv
Member Avatar for z00mit

VT_BSTR can not be directly converted to std::string because a BSTR is UNICODE wchar_t*, not char*. You have to use one of the conversion functions. Here is an example, when compiled with VC++ 2008 Express you must compile for UNICODE (the default) [code] #include <windows.h> #include <tchar.h> #include <string> #include …

Member Avatar for Ancient Dragon
0
838
Member Avatar for Trendkiller

The first problem is line 25 -- count the ( and ) pairs. line 28 and 31 have the same problem [icode]if ( (hours<3) && (hours>0) )[/icode]

Member Avatar for me_ansh
0
331
Member Avatar for asharrajpoot

[QUOTE=asharrajpoot;772981][code] A B C D E F G G F E D C B A A B C D E F G F E D C B A B C D E G F E D C A B C D G F E D A B C G F …

Member Avatar for me_ansh
0
189
Member Avatar for madrang

fstream us standard c++ class so it works the same on all operating systems that support them. WritePrivateProfileString() does nothing more than rewrite the file with the new string in the form [icode]<tag name>=<value>[/icode]. You can do this yourself with ofstream. [code] ofstream out("filename.ini"); out << "[MySectionName]\n"; // beginning of …

Member Avatar for madrang
0
109
Member Avatar for titosd

>>and all the code is correct Then why is getWord() never called to read the words from the file? You are on very dangerous ground with that replace function. The intent of the function is to replace one word with another word within the sentence. Lets say I enter a …

Member Avatar for me_ansh
0
192
Member Avatar for Pabs666

This is c++, not C. So use c++ ifstream to read the file one word at a time. Is there a need to keep the individual fields with the entire line? If not, then you don't have to keep them in memory, just read the file one word at a …

Member Avatar for Ancient Dragon
0
95
Member Avatar for venomxxl

I'm not sure what you are trying to accomplish, but that header file is really unnecessary. Both functions are coded in code.c and the header file will not prevent that. But you should get an error in main.c because fcn2() was not declared (because ifdef'ed out in the header file).

Member Avatar for venomxxl
0
141
Member Avatar for mahdiahmadirad

line 32 and 33: That doesn't work because the string is located in read-only memory, and attempting to write to that memory will most likely fail. Correction: This puts the string in writeable memory. [icode]char BlankPattern[]="###############";[/icode] line 39: The above doesn't work either because you can not return a character …

Member Avatar for mahdiahmadirad
0
97
Member Avatar for The Dude

That second one from 1970 was right on target. The speaker was exactly right about how the computer would change our buying habbits.

Member Avatar for The Dude
0
74
Member Avatar for winrawr

[URL="http://en.wikipedia.org/wiki/Category:Executable_file_formats"]Here is a list of file formats[/URL] -- there might be more, I don't know. I didn't know a.out was a file format -- just thought it was a filename.

Member Avatar for Ancient Dragon
0
101
Member Avatar for IVantToVin

you probably want [icode]vector<ofstream> fileList;[/icode] Now all you have to do is loop through the names and open the files, something like this: [code] vector<ofstream fileList; fileList.resize(argc-1); for(int i = 1; i < argc; i++) { fileList[i].open(argv[i]); } [/code] Now to write something to all the files just use another …

Member Avatar for Agni
0
2K
Member Avatar for mini programmer

1) It can be used in either text or binary, but most often used in binary files. Not very meaningful in text files. 2) The [b]type]/b] is the object that is store in the file. For example, lets say you saved a bunsh of Personnel c++ classes, then it would …

Member Avatar for mini programmer
0
147
Member Avatar for The Dude

spanking is one thing -- and ok. beating is quite another and punishable by some prison time. Parents who have a hard time distinguishing between the two need some serious time with a head shrink.

Member Avatar for William Hemsworth
0
63
Member Avatar for sunnyalways1234

for a beginner, get the free [URL="http://msdn.microsoft.com/vstudio/express/vb/default.aspx"]VB.NET Express edition[/URL]. >>what is the diffrence between vb.net and visual basic language can u please tell me Nothing, the are one and the same. vb is an abbreviation for "visual basic". .net is the newest version. >>what is the diffrence between vb.net and …

Member Avatar for gracezika
0
328
Member Avatar for karthisargunan

Or just convert to int, add one, then convert back to string, as previously suggested [code] char phone[] = "0000000"; int ph = atol(phone)+1; sprintf(phone,"%08d", ph); [/code]

Member Avatar for Ancient Dragon
0
511
Member Avatar for Emma1

gets() is NEVER safe to use because it can corrupt the memory of your program and cause it to crash (or coredump in *nix). [URL="http://www.gidnetwork.com/b-56.html"]Read this explaination[/URL].

Member Avatar for Ancient Dragon
0
112
Member Avatar for GrimJack
Member Avatar for pacx

> `char *str = new char();` Do you really mean something like `char *str = new char(Size);` so that more than 1 character is allocated??? Can't really tell much from the code you posted because there are several undefined variables -- such as **temp**.

Member Avatar for pacx
0
168
Member Avatar for prashanth s j

Might be a missing semicolon previous to line 81 in the *.cpp file, or missing header file, or missing declaration of INBUFF and OUTBUFF, or a host of other things.

Member Avatar for me_ansh
0
102
Member Avatar for tarekkkkk

[URL="http://en.wikipedia.org/wiki/Plonk"]Plonk[/URL] >>waw man ur a great guy Oh! Narue when did you have a sex change :) And what is [b]waw[/b] [quote="Wikipedia"] WAW or Waw can mean: Watch and wait the letter Waw in the Hebrew, Arabic and other (mostly Semitic) alphabets IATA code for Warsaw Frederic Chopin Airport WAW …

Member Avatar for jbennet
0
806
Member Avatar for edward_paul05

[QUOTE=edward_paul05;551633]i change my password now, ^_^ .[/QUOTE] I would hope so -- that was probably the dumbest thing I have ever seen posted here at DaniWeb since I first joined. Why didn't you just open your wallet and toss all your money out into the street?

Member Avatar for jireh
0
114
Member Avatar for RenFromPenn

use [b]fgets()[/b] -- [URL="http://www.gidnetwork.com/b-56.html"]never ever gets() [/URL]-- to read the entire line from a file or from the keyboard.

Member Avatar for ajay.krish123
0
140
Member Avatar for Ancient Dragon
Member Avatar for debasisdas
0
34
Member Avatar for daviddoria

>>vector<double> a(5); That creates an array of 5 doubles. >> a.push_back(1.2); That adds an additional element to the array, so after this line executes the array will have 6 elements.

Member Avatar for daviddoria
0
77
Member Avatar for Nicklorion

>>fin >> myArray The >> operator will stop reading at the first space or tab. If you want the entire line then use [icode]getline(fihn.myArray);[/icode]

Member Avatar for Nicklorion
0
143
Member Avatar for riahc3

list errors. The last line -- VC++ 6.0 is old style C which forces you to declare all objects at the beginning of function.

Member Avatar for riahc3
0
134
Member Avatar for ashishchoure
Member Avatar for The Dude
Member Avatar for The Dude

[QUOTE=Salem;781091]> Your home planet is: Silbob Silbob Howdy neighbour :)[/QUOTE] Yup, I live there too :) So far Dude is the only odd ball here.

Member Avatar for zandiago
0
151
Member Avatar for Ancient Dragon
Member Avatar for sneekula
0
125
Member Avatar for shasha821110

>>temp.m_buffer=new char[] m_length; Shouldn't that be this: [icode]temp.m_buffer=new char[m_length];[/icode] >>if(!m_length) That means if m_length == 0. When that happens strlen(other) == 0 and the previous new operator will return a pointer to a 0-length character array. So if the length of the allocated buffer is 0, how in the world …

Member Avatar for shasha821110
0
115
Member Avatar for Ancient Dragon
Member Avatar for GrimJack
0
170
Member Avatar for AdRock

>>SavingsAccount.hpp(9) : error C2512: 'Account' : no appropiate default constructor available That means Account needs a constructor that takes no parameters.

Member Avatar for AdRock
0
157
Member Avatar for Ronen444
Member Avatar for mcamacho07

start here. Sadly, we can't do a lot for you if you don't have your text book, unless you can remember how to program. [code] int main() { // your code goes here } [/code]

Member Avatar for Salem
0
574
Member Avatar for u8sand

Don't know what the problem is. Use your compiler's debugger and single-step through the code. Maybe it has a problem with the "/IM" parameter. Maybe that parameter should follow notepad.exe.

Member Avatar for u8sand
0
145
Member Avatar for titosd

What errors do you get? You only posted code snippet so its not possible for us to compile/test your code. you declared [b]dic[/b] but never filled it with anything. So how in the world do you expect that loop to find a word in the dictionary? Why don't you just …

Member Avatar for Aia
0
146
Member Avatar for digantha

Ask your teacher for homework ?? Or you could read through all the threads on this board and try to do the assignments yourself.

Member Avatar for Ancient Dragon
0
59
Member Avatar for scru

did you see some of [URL="http://www.codeproject.com/info/search.aspx?artkw=get+recently+used+file+list"]these articles[/URL]?

Member Avatar for Ancient Dragon
0
188
Member Avatar for u8sand

Below is some code I got from [URL="http://www.codeguru.com/cpp/i-n/network/networkinformation/article.php/c2499"]CodeGuru[/URL] [code] #include <iostream> #include <string> #include <winsock2.h> using namespace std; #pragma warning(disable: 4996) string hostn() { char szHostName[128]; std::string str; if( gethostname(szHostName, sizeof(szHostName)) == 0 ) { // Get host adresses struct hostent * pHost; int i; pHost = gethostbyname(szHostName); for( i …

Member Avatar for u8sand
0
185
Member Avatar for Manutebecker

I didn't bother to memorize them -- let VC compiler generate them. Although I admit I would use MFC wxWidgets instead of pure win32 api.

Member Avatar for William Hemsworth
0
96
Member Avatar for Slobodin

If you can change the content of the input file, change the ls command to report file names only. That would greatly simplify your program.

Member Avatar for Ancient Dragon
0
98
Member Avatar for anujtripathi
Member Avatar for The Dude
Member Avatar for Ancient Dragon
0
23

The End.