111 Posted Topics
Re: The Dev-Pak for GMP is on this thread. I attached it to one of my posts: [url]http://www.daniweb.com/forums/thread145324.html[/url] | |
Hi, I was reading something that said goto was bad. Why is it a bad practice to use it? | |
Hi, I'm reading a bitmap manually to try and make a program that does steganography, but I can't read the file correctly. The headers I read come out completely messed up, and they fail the check to see if I'm reading a bitmap file or not (if (FileHeader.bfType != (int)"BM")). … | |
Re: I have tried to do this before. Just read a tutorial on how to do it by hand and make a function or whatever. Check this out: [url]http://www.permadi.com/tutorial/numBinToDec/index.html[/url] Pretty much, you move left starting from the first binary digit on the right. You increment the power from 0, and multiply … | |
Hi, I keep getting an undefined identifier error when I try to do this: [Code=C] typedef char bool; // Make a bool type char false = 0, true = 1; // Make true and false void foo() { switch (something) { case 1: bool aaaaa; break; } } [/Code] It … | |
Hi, I'm taking a programming class at my school. My teacher gave us a pdf that said "..You will be writing a program that can read a bitmap and insert a secret message into the bytes of the picture in a retrievable way using the picture as a cipher and … | |
Re: You need to add the bin directory of MinGW to your PATH environment variable. | |
Hi, I'm need to be able to load bitmaps, preferably as resources, draw them, and get their size. How would I do this? I'm on Windows, and using Dev-C++ 4.9.9.2. | |
Re: Do what Salem said. I'm pretty sure it's called double buffering. | |
Re: if you are getting multiple definition errors, change your headers to look like this: [Code=C++] #ifndef HEADERNAME_H #define HEADERNAME_H // Your code here #endif [/Code] That way if you include a header more than once, it'll only be included if it hasn't been. | |
Re: To pass a parameter to the program, do it from the command line. If it's devcpp.exe. Do dev-cpp.exe -c "C:\config" | |
Re: Oh MY GOD! The multi(0) stuff is WINDOWS LOADING. I use safe mode ALL THE TIME. [B]JUST WAIT FOR IT TO LOAD[/B] | |
Re: You can do that: [code=C++] #include <sstream> std::string Convert (float number){ std::ostringstream buff; buff<<number; return buff.str(); } [/Code] but for more precision, include <iomanip>, and add setprecision(<number of digits of precision>) in your buff<<number. Like "buff << setprecision(32) << number;" | |
Re: Use the GMP library. It works for me. If you're using Dev-C++, you can just search for packages online with the built in "Check for updates/packages" thing, and find it in the list. If not go here: [url]http://gmplib.org/[/url] ![]() | |
Hi, I'm making a program that can send an SMS message to a cell phone using any number that the user chooses. I have been successful sending a message with an SMTP server that says it's from an email address, but I need to make it show up as a … | |
Hi, I'm using Expat to parse XML, and I have an array of attributes for an element. I need to be able to loop through them all, and get their values, I don't know the array size, and it's a multidimensional array, so I couldn't do [Code=C++] int count = … | |
Hi, I'm starting to program with DirectX. I haven't use pixel or vertex shaders, but I know DirectX supports them. My graphics card is a piece of crap, and it doesn't support pixel and vertex shaders. How could I render them with software or an emulator, so I can test … | |
Re: [url]http://www.google.com/search?q=How+To+Convert+ounces+to+Metric+tons[/url] | |
Hi, I was wondering how to use TAPI in C++ to communicate with my modem. How would I accomplish this? I'm not using Visual C++. I'm using dev-c++ 4.9.9.2. | |
Hi, whenever I compile [B]any[/B] sample code for DirectX, I get this error: [Linker error] undefined reference to `D3DXCreateFontA@48'. I'm using Dev-C++ 4.9.9.2, I'm linking it with: libd3d9.a libd3dx9d.a libdinput.a libdinput8.a libdxguid.a I don't know why this is happening. Please help.:twisted: | |
Re: I use Dev-C++, and that works fine with OpenGL, and Irrlicht (irrlicht.sourceforge.net), so I'm betting you could make your aquarium with that. | |
Re: I already solved this for one person. Check this out: [url]http://www.daniweb.com/forums/showthread.php?t=136779&page=2&highlight=C%2B%2B+trainer+coding[/url] | |
Re: This is a little long, but it works! [Code=C++] #include <string> #include <iostream> using namespace std; int main() { string word1, word2, word3; cout << "Enter word1: " <<endl; cin >>word1; cout <<"Enter word2: " <<endl; cin >>word2; cout << "Enter word3: " <<endl; cin >>word3; int Longest, Shortest; // … | |
Hi, I was wondering if anyone knew any code snippets that do something cool like: Open the CD tray: [Code=C++] mciSendString("open CDAudio", NULL, 0, NULL); cout << "Opening CD-ROM door ..." << endl; mciSendString("set CDAudio door open", NULL, 0, NULL); cout << "Closing the CD-ROM door in 5 seconds ..." … | |
Re: No, just copy the url to view the picture! you don't have to register! =) | |
Hi, I'm reading Programming Windows Fifth Edition by Charles Petzold. In the part I'm reading, it talks about GDI functions. I'm trying to get the pixels that are 1 to 100 + the mouse x coordinate and the y coorinate, then draw them on my window. It's hard to explain. … | |
Re: Dev-C++ 4.9.9.2 [B]will[/B] compile this. I have done it before. Check your resource.h for any missing semicolons. | |
Hi, how would I make a program that gets input from a user, sends it to a program with popen(), gets the output, and repeats this until the program ends? I have tried, but I only get part of the output, and when I type "exit", it won't end the … | |
Hi, I have been trying to get MySQL to work on my apache server with PHP on it. My Apache version is 1.3.29 and my PHP version is 5.0.0RC2. I'm also running Windows XP Professional SP2 32 bit. I tried modifying the php.ini file to load the php_mysql.dll, but I … | |
Hi, I need to get the output of a program called with the system() function. How would I do this? | |
Hi, I have been trying to make a dialog, but I keep getting an error. I'm using Dev-C++ 4.9.9.2, and I get this error "[Resource error] syntax error". Here's my code for the dialog: [Code] IDD_CONNECT DIALOG DISCARDABLE 0, 0, 300, 250 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU … | |
Hi, I have been making a program that encrypts files. It works, but it compresses them. It only does it a little bit, but it does. It's weird. Why is it doing this? I have attached a zipped folder with the code, binary, an encrypted file, and the original file. … | |
Re: A good book that I have recently bought is [U]Programming Windows Fifth Edition[/U] by Charles Petzold. It talks about using the Win32 API. It also has code examples and an accompanying CD. It's like $60, but I got mine used for $30 on [url]www.amazon.com[/url]. | |
HI, I have been wondering how to make a program with the XP style buttons, edit boxes, etc. in it. I have made a GUI, but it's ugly. How can I make the controls look like the ones on say, a windows property sheet or something like that? I have … | |
Re: If you're lazy and on windows: [Code=C++] system("shutdown -r"); [/Code] | |
Hi, I have bought [U]Programming Windows Fifth Edition[/U] by Charles Petzold. I was wondering if there are any differences between the Win32 API talked about in this book and the one that applies to Vista or anything newer than Windows 2000. Also, my book didn't come with the CD (I … | |
Hi, I have been making a macro building program. I am trying to handle mouse events right now. I have made a program that hooks the mouse, then puts information into a text file which is then read by another program. The recorder writes the delay in milliseconds, so the … | |
Could anyone tell me if there is a function like the InputBox() function in Visual basic? I have googled it and come up with nothing. Thanks. | |
Re: Check out [url]www.cplusplus.com[/url]. It's filled with information about file IO, strings, user input, and lots more. You might not want to make a GUI if you are very new to C++ and OOP. | |
Re: I started out with visual basic, so a GUI game of rock paper scissors would probably be out of the question. When I started C++, it took me a [B]long[/B] time to get the hang of it. One of the first things I made was a prime number generator. You … | |
Hi, is there a data type larger than unsigned long long int except double? I don't want double or float because I need to keep it as precise as possible. I also need it to be able to do modulus. How would I do this? | |
Hi, I am making a simple screen shot program. I need to be able to capture the entire screen, or if possible, a region of the screen (like a rectangle from point (25, 60) to (300, 456)). I also need to be able to save it to a bitmap file. … | |
Re: Hi, this works for notepad, so i think it'll work for msn. Modify it a little and try it. [Code=C++] #include <windows.h> int main() { char buffer[MAX_PATH]; char *message = "hello"; sprintf(buffer, "%s", message); //GetWindowText(hwContact, szContact, 256); //strcpy(&szContact[strlen(szContact)], " - Conversation"); //GetWindowText(hwMsg, szMsg, 256); //strcpy(&szMsg[strlen(szMsg)], ""); HWND fcContact = FindWindow(NULL, … | |
Hi, i have made a simple program that gets all of the running processes on a computer and gets the text from their windows. It works, but sometimes it gives the wrong text. For example, i have notepad open, and it doesn't say the right text. To compile, you have … | |
Hi, I recently watched the movie Iron Man. While making his first suit, Tony Stark apparently is using C++ on the laptop in the background. Is this C++ and if not what is it? | |
Hi, whenever I put a [B]blank[/B] DVD-R or RW disk into my drive, Windows will say it's not there. The cursor turns into a little CD, but whenever I try to burn an ISO image or any type of file onto it, it says that it's not in. I looked … | |
I was doing a simple ftp and look what I found! Look at the attachment! | |
Re: If the file is in the same directory couldn't you just do this? [Code=C++] #include <conio.h> #include <fstream> #include <iostream> #include <string> using namespace std; int main(int argc, char* argv[]) { string FileName; cout << "Enter the file name: "; cin >> FileName; cout << endl << endl; ifstream in(FileName.c_str()); … |
The End.