15,300 Posted Topics
Re: You don't have the time nor the skills to tackle large games, [URL="http://www.google.com/search?client=firefox-a&rls=org.mozilla%3Aen-US%3Aofficial&channel=s&hl=en&source=hp&q=c%2B%2B+games&btnG=Google+Search"]Here are some links[/URL] that might help you. | |
Re: Are you using MFC? CMainFrame doesn't have a graphical interface, so the answer is NO. | |
Re: Worked for me. I don't know if the size is correct or not but I got 4096 for the directory size. All I did was change the path to one that's on my computer. I'm running Windows 7, VC++ 2008 Express if that matters. | |
That is Wal-Mart this year -- no Christmas music and no Christmas tree at the front doors. Its really sad that Wal-Mart isn't in the Christmas spirit this year. | |
Re: What compiler did you use? I compiled it with vc++ 2008 Express and got a lot of warnings about using uninitialized variables. Pay close attention to your compiler's warnings because they are often actual errors. [edit]I compiled it with Code::Blocks (with MinGW) and it does not produce the warnings about … | |
Re: Please deposit $5,000.00 USD in my paypal account and I will be happy to do your homework for you. | |
Re: [QUOTE=Agni;1087215][code]Form1 ff = gcnew Form1();[/code] it probably want's you to declare 'ff as a 'Form1*', but i could be wrong since i've never seen the 'gcnew' operator before.[/QUOTE] Probably [icode]Form^ ff[/icode], depending on which version of CLR. >>I'm new to C++, If you are trying to learn c++ than stay … | |
Re: Search these forums because the solution has been posted several times. | |
Re: Nobody is just going to give you all that code. First you have to decide what the program will do -- design the menus, screen layouts, etc. Write it down on paper so that you don't get confused. Once you are finished with that then you can begin to write … | |
Re: You might write a database program, such as a DVD/CD maintenance using an SQL database such as [URL="http://www.sqlite.org/"]SqLite[/URL]. You will have to learn [URL="http://www.google.com/search?client=firefox-a&rls=org.mozilla%3Aen-US%3Aofficial&channel=s&hl=en&source=hp&q=sql+tutorial&btnG=Google+Search"]SQL language[/URL]. | |
Re: If you need the space, get rid of "Most Recently Viewed Threads" and put back My Favorite Forums. | |
Re: Post what you can do and ask questions about what you can not do. Also tell us what compiler you are using. [code] #include <stdio.h> int main() { // write our program here } [/code] | |
Re: Make sure you compile the program(s) for release, not debug. You might also have to install one or more of Microsoft's dlls, they are located in a folder called redist in the compiler's install directory. On my computer they are here: C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\redist\x86\Microsoft.VC90.CRT | |
Re: >>but does not seem to work... What doesn't work? Do you get compiler errors? If yes then post the first few errors. | |
Re: >>why not 4 bytes. You answered your own question in the first sentence you posted. Because 5 * sizeof(int) = 5 * 4 = 20. Simple grade-school math. | |
Re: Why do you want to save the output to a file just to understand return codes? The return code from system() is pretty much useless -- all it indicates is whether system() successfully ran the command or not. It says nothing about the program that system() ran. If you need … | |
Re: scnaf with %d will only accept numeric data -- anything else is ignored and scanf() does not change the value of the input parameter. Check the return value to see if scanf() successfuly converted any data. | |
Re: For some really big challenges designed for people of all experience levels see [URL="http://www.programmingforums.org/forum64.html"]Sane's Monthly Algorithm Challenges here[/URL]. I have made the three most recent challenges stickies so that they can be easily found. | |
Re: You can write files anywhere you want to on your computer as long as your login account has permissions to do that. For example [icode]newfile.open("c:\\dvlp\\test\\exemplu.txt");[/icode] | |
Re: you first need to learn how to build a windows gui program. [URL="http://www.winprog.org/tutorial/"]Here is a tutorial[/URL] to get you started. | |
Re: >>Here's a question for you. Not for me -- I already know how to do that. | |
Re: If your target os supports standard iostreams then I'd use it. win32 api is very low level and supports only binary files -- yes text files can be written as binary files but using std::fstream makes it a lot easier. | |
Re: why are you doing that the hard way, such as one character at a time, when there are much faster, easier, and less error-prone ways, such as fscanf() . If your instructor requires you to do it that way, then do it. Otherwise you have just wasted how many hours?? | |
![]() | Re: You are suggesting a blackball list? Or a hit list? Just because someone doesn't mark the thread solved, reply, or post a thank-you doesn't mean your post was not helpful or unread. Of all the 10 thousand threads I have posted in only 1500 of them were marked solved, or … ![]() |
Re: Its not possible to delete just the parent -- when you delete the child then parent gets deleted too. Both parent and child form a single object, not two. | |
Re: IMO phthon is a toy that non-programmer hobbyists use, in the same category as Quick Basic. C/C++ is used by professional programmers to write real professional programs. | |
Re: In the while loop you need to change variable [b]i[/b] to something else because that while loop is destroying the value of [b]i[/b] that the for loop is supposed to increment. Copy the value of [b]i[/b] into another variable, such as [b]k[/b] and use [b]k[/b] in that while loop. | |
Re: If you want to write your own, you will probably want to study [URL="http://www.google.com/search?client=firefox-a&rls=org.mozilla%3Aen-US%3Aofficial&channel=s&hl=en&source=hp&q=yacc&btnG=Google+Search"]yacc[/URL] (Yet Another Compiler Compiler) | |
Re: Read Microsoft's [URL="http://msdn.microsoft.com/en-us/library/aa716527%28VS.60%29.aspx"]Scribble tutorial[/URL]. | |
Re: >>I've been searching for this on Google for about two weeks now and keep coming up dry You mean you have been googling for two weeks and never [URL="http://lmgtfy.com/?q=win32+api+tutorial"]tried this[/URL]? :icon_eek: Read the first link you see. | |
Re: lines 57 and 58: you do not have to initialize the arrays one letter at a time -- just do the entire string at one time [code] char currentWord[] = "......"; /* The dot word */ char guessWord[] = "monkey"; /* The word that needs to be guessed */ [/code] … | |
Re: 2x3x3 = 18, not 12. I suppose you meant 2x2x3?? | |
Re: Get row: you will have to sequentially read each line of the file in order to get to the row you want. Delete row: rewrite the entire file, omitting the row to be deleted. Open two files: input file is the file that contains the row to be deleted, the … | |
Re: There are two ways to add a library to the program 1) [icode]#pragma comment(lib, "toolkit.lib"); [/icode] Put this near the top of any *.cpp file that is in the project. 2) Select menu item Project --> Properties --> Configuration Properties --> Linker -->Input. Now add the name of the library … | |
Re: [URL="http://lmgtfy.com/?q=COM+surrogate+error"]did you try google[/URL] to find that error message ? | |
Re: CString has Left(), Right(), and Mid() methods which are something like std::string's substr() method. | |
Re: ODBC is the oldest and most common way to access SQL databases with C and C++ languages. google for "odbc tutorials" and you will find some. You will also need to learn the SQL language. Although there is supposed to be a standard sql each database publisher implements its own … | |
Re: Depends on how the card reader is attached to the computer. If its attached to a COM port then use [URL="http://msdn.microsoft.com/en-us/library/aa363194%28VS.85%29.aspx"]MS-Windows communications functions[/URL]. | |
Re: You can't [b]draw[/b] to a text file. I don't know what your game looks like, but if it contains a 2d array called a Board [code] char Board[5][5]; // write to a file ofstream out("save1.bin", ios::binary); out.write(Board, sizeof(Board)); // read from file ifstream in("save1.bin", ios::binary); out.read(Board, sizeof(Board)); [/code] | |
Re: The term "[URL="http://en.wikipedia.org/wiki/Precompiled_header"]precompiled headers[/URL]" means something completely different than what you are trying to do. You are tring to create a library of functions/classes that can be used in other projects. All you really need in those other projects is the *.h and *.o (or *.obj) files. | |
Re: What I would do is sort each of the words and then just compare them. Example: orchestra and carthorse would both become acehorst. Don't use string leterals do so this because they can not be changed. | |
Re: >>can ypu help me? Yes. But first you need to post the code you have tried to solve the problem. We are not a program manufacturer. | |
Re: post code. Works ok for me [code] #include <conio.h> #include <iostream> using namespace std; int main() { int c; while( (c = getch()) != EOF) cout << (char)c << " "; } [/code] | |
Re: I didn't get any errors compililing those headers with VC++ 6.0 [code] #include "stdafx.h" #include "iostream" #include<string> #include<vector> #include<algorithm> #include<cmath> using namespace std; inline void keep_window_open() {char ch; cin>>ch; } int main(int argc, char* argv[]) { return 0; } [/code] | |
Re: If you live in the USA why not have everything shipped from amazon to your house, then you bundle all the books up and ship them to K however you wish. Everything from Amazon may or may not be shipped at the same time. | |
Re: [code] int* A = new int[10]; // dynamic array int A[10]; // simple array [/code] If you want the explanation in words, then I'd suggest you look them up in your text book. There are also a lot of online explanations such as [URL="http://www.chips.navy.mil/archives/99_apr/c++arrays.htm"]this one[/URL]. | |
Re: line 19: you have to call the function sprintf() to format that string, like this: [icode]sprintf( dataDone, "[%s][%d%]", prog, loop);[/icode] | |
Re: You can erase an element from the map, but you can't delete just one of the pointers because it belongs to an array. If you allocate the pointers one at a time then you could delete them in any order you want. [code] map<int,particle*> particle_map; for(i==0;i<number_of_particles;i++) { particle_map[i] = new … |
The End.