15,300 Posted Topics
Re: You're going to have to provide a whole lot more information about your robot if you really expect anyone to help you. You made it sound like you have a robot walking down our city streets! | |
Re: [URL="http://www.codeproject.com/KB/files/CABCompressExtract.aspx"]Read this[/URL] | |
I'm trying to set up NetBeans IDE on my Vista Home, and have a choice between those two compilers. Which one would you choose? I also want to have Code::Blocks. | |
Re: In that case you need to learn to crawl before attempting to run in the Olympics. Learn the c++ language from the beginning. Its not something you can learn in an hour or two -- probably takes several months to learn just the basics well depending on how fast you … | |
Re: Reading the input stream is the only standard way to do it. That means you have to dynamically expand the input buffer with realloc() while reading the input stream. | |
Re: srand() is ued to seed the random number generator. If you call srand() with the same number every time your program is run rand() will generate the same sequence of random numbers, which is the default if the program never calls srand(). To get rand() to generate a different set … | |
Re: "setup and deployment"??? AFAIK the Express version does not have such an option. | |
Re: To attach a doc --- Look just below the Quick Message editor and you will see two buttons -- "Post Reply to this Thread" and "Use Advanced Editor". Click the "Use Advanced Editor". Next, scroll down until you see a button "Manage Attachments" then click that button. That will let … | |
Re: replace fread() with fgetc(). Of course you will have to deleted and rewrite eveything inside that while loop. | |
Re: You can post, answer questions, or just browse around. It's up to you and no one will critisize you for whatever you want to do. | |
Re: The ThreadProc parameter to CreateThread() must be either a simple global c-style function or a static method of a c++ class. You can not pass non-static class methods to any win32 api function. line 12: handl = &thr_handl; Just what do you expect to accomplish with that statement??? As soon … | |
Re: Post your code or do you think we are mind readers? malloc() and calloc() work perfectly -- its your code that doesn't work for some unknown reason. | |
Re: make that check at line 40 of the code snippet you posted. If you don't want to process any subdirectories at all then delete lines 37-43, just leaving an empty if statement. | |
Re: just use WinZip -- it already does that. | |
Re: What part of the instructions do you not understand? Post what you have attempted to do so far. | |
Re: Happy New Year -- we still have 2 hours to go :) Years ago when I was a young lad it was fun to stay up at night and watch all the parties on TV. They don't do that any more, it's so boring now. | |
Re: create an array of HANDLE objects so that you can put the code in a loop. [code] const int MaxThreads = 20; HANDLE hThreads[MaxThreads]; for(int i = 0; i < MaxThreads; i++) hThreads[i] = (HANDLE)_beginthread(TheThread, 0, NULL); ... for(int i = 0; i < MaxThreads; i++) TerminateThread(hThreads[i],0); [/code] | |
Re: If you want to convert C# to anything then convert it to CLR/C++ which is managed c++ and a very close cousin of C#. c++ itself knows nothing about System. | |
Re: You should leave random_char as int because rand() will return values that overflow (dont fit) char. [URL="http://www.cplusplus.com/reference/clibrary/cstdlib/rand/"]Here[/URL] is a hint how to generate a random number between 'a' and 'z'. Note that any standrd ascii chart will tell you the decimal values of characters. | |
Re: reading date/time is simple -- just use the functions in time.h time() returns the current date/time in seconds since 1 Jan 1970. Then if you want to know the month, day and year you need to call localtim(), which returns a structure with that info. | |
Re: What compiler are you using? If you don't have the *.lib then you have to call LoadLibrary() and GetProcAddress() for each of the functions. But before you make any drastic changes to your code check the DLL project to see why the compiler didn't create the *.lib. It might because … | |
Re: function LoadUsers() must allocate space for each of the character arrays in the users array. All it is currently doing is using the same std::string over and over again, each time destroying the value of the previous time. Two fixes: 1. re-declare char* users[100] as vector<string> users. or 2. replace … | |
Re: Read three integers at a time then print them back out in reverse order. | |
Re: since vectors are arrays why would you want to do that? You could create a vector of vectors [code] vector< vector<double> > RAzE1; RaZe1.push_back(range); RaZe1.push_back(az); RaZe1.push_back(el); [/code] Of course that won't work if you want to pass the array to a function that expects double[] Here is an exmaple [code] … | |
Re: There are at least a couple ways to do it. One is using <map> class and the other is to use an array. To use an array: create an int array of 255 elements, one for each possible char in the ascii character set. I know that's too many for … | |
Re: Does the program run ok in release mode on your computer? | |
Re: If you want a class method to be inline then just code it directly in the class declaration. The inline keyword is unnecessary here. [code] class SomeApp { private: SomeApp() { } public: returnType_t SomeState() { // code here return 0; } }; [/code] | |
Re: [URL="http://lmgtfy.com/?q=armstrong+number"]This [/URL]is an armstrong nuumber You will even find example programs how to compute them. | |
Re: None. Maybe you should volunteer to teach or tutor that course. | |
Re: There are hundreds of program source code on the net. All you have to do is learn how to use google. There are several ways to do what you want, the oldest and most supported method is via ODBC. | |
Re: post an example of what you are talking about. It might mean the function returns a 2d array of some sort. It could also mean that its a pointer to a function. Never know until you tell us more. | |
Re: Welcome to DaniWeb. For those readers who are not from USA, he is from the state of Alabama, sothern part of USA. As for reputation points -- see those up and down arrows to the right of each post (except your own)? Just click one of them (up is positive … | |
Re: If you hurry up you still have time to add code tags to your post so that people can read the code better. Just hit the Edit button and add this [noparse] [code] // put your code here [/code] [/noparse] | |
Re: Whether to use internal or external hard drive will depend on how much disk space all those games will consume. Since you have such a huge internal hard drive I would put them there if they take less than a couple hundred gb. | |
Re: managed c++ does not use new -- it uses gcnew. And you have to make W2 a pointer. The braces are unnecessary. [code] Window2^ W2; W2 = gcnew Window2; W2->Show; [/code] | |
Re: how to use: 1. call time() to get current date/time as number of seconds since 1 Jan 1970. 2. call localtime() to get struct tm pointer. If you want GMT them call gmtime() instead of localtime() 3. Use sprintf() or strftime() to convert the struct tm to a string in … | |
Re: You can't just add text to the beginning of a file. You have to completely rewrite the file to do that. First, open a new file, write the new text to it, then copy the old file to the end of the new file. Next, delete the original file then … | |
Re: try declaring the arrazys globally, outside any function. And its [b]int[/b] main(), never void main() [code] #include <iostream> const int size=85020; int b[size]; char c[size]; float f[size]; int main() { std::cin.get(); } [/code] | |
Re: The maximum value of register ax (and other similar 16-bit registers) is 255. Any register can be treated as either signed or unsigned. So 255 is the maximum of unsigned while 126 is the maximum signed. Registers do not contain instructions -- only data. mov, jmp, cmp, etc are instructions. | |
Re: [code] struct record { char name[80]; // blabla }; int main() { struct record[255]; // creates an array of 255 record structures // copy name to the first structure in the array strcpy(record[0].name,"John Smith"); } [/code] | |
Re: >>I just discovered that it says right on my assignment that I am not able to be assisted by anyone You poor boy -- you should have read that before posting here. Next time learn to follow instructions. | |
Re: [URL="http://lmgtfy.com/?q=c+linked+list"]check out these links[/URL] | |
Re: And don't feel bad if someone posts a correction to whatever you said -- none of us are perfect. And you might be supprised at how much I've learned since joining DaniWeb too. Development is a life-long learning process and nobody stops learning. | |
Re: Those numbers are the data types. They should be defined in one of the header files you have to include in your program. [URL="http://msdn.microsoft.com/en-us/library/ms714540(v=vs.85).aspx"]Here [/URL]is a complete list. | |
Re: Would have to see the C code but most likely the -16 is allocating 16 bytes on the stack for local variables, such as four 4-byte integers. | |
Re: A couple years ago I walked into a doctors office and the receiptionist told me that she had to do evething manually because her computer was broke and a repairman had not yet arrived to fix it. I asked her what happened to her computer and she told me she … | |
Re: maybe [URL="http://lmgtfy.com/?q=how+to+convert+system%3A%3Astring+to+tchar"]this[/URL] will help you | |
Re: In Dev create a c++ project then just add all the *.c and *.cpp files to it that you want. Dev-C++ will do all the rest for you, you don't have to do a thing. But I would suggest you replace Dev-C++ with Code::Blocks because Dev-C++ is old and has … | |
| |
Re: [QUOTE=wamuti;513110]Also try MFC(Microsoft Foundation Classes). It is an encapsulation of Windows API. To make them work just compile, build and execute the ordinary way!. As easy as that(You can even skip compile:) ).[/QUOTE] I agree MFC is pretty easy to use, but it isn't free. Neither VC++ 5.0 Express nor … |
The End.