15,300 Posted Topics
Re: You have to use win32 api console functions which you can not do with Turbo C or TC++ because that compiler is too old. | |
Re: If buffer contains the binary representation of the long then you can just do a simple assignment. But you need to consider the Big/Little Endean problem if the data comes from another source such as across the internet. [icode]long x = *(long *)buffer;[/icode] or use memcpy [code] long x; memcpy(&x, … | |
Re: If you use Access (or any other database) you will have to lean SQL query language and one of the many programming languages that can access the database, such as VB, C#, C and C++. Using Excell you don't have to know anything about any of that. So your choice … | |
Re: >>FindFirstFileW' : cannot convert parameter 1 from 'const char [6]' to 'LPCWSTR' That errror means you are compiling your program for UNICODE, which is the default setting for VC++ 2005/2008 compilers. If you don't care about languages other than English you can turn UNICODE off. Project --> Properties --> Configuration … | |
Re: See a [URL="http://www.microsoft.com/express/vc/"]video here[/URL] (Scroll down the page to the video link) While you are at it you should read the other material presented there. If you are looking for c++ books then just read the [b]Read Me[/b] threads at the top of this board. >>I want to create HGE … | |
Re: Why don't you ask the people at [URL="http://sourceforge.net/forum/forum.php?forum_id=48211"]Dev-C++[/URL] ? | |
Re: That is an ancient 11-year-old compiler (released in 1997) that does not support c++ very well. You should probably upgrade to the most recent compiler anyway. BTW: I don't know how to fix your problem. | |
Re: I'm pretty sure you will have to write kernel-level program to do that. [URL="http://catch22.net/tuts/kernel1.asp"]Here is a tutorial[/URL] to help get started with the Windows DDK [URL="http://www.ddj.com/windows/184416453"]IOCTL [/URL]is another possibility | |
Re: line 30: why is that a [b]double[/b] instead of an [b]int[/b] ? Do exam IDs contain decimal places ? line 39: [b]assert[/b] does nothing if the program is not compiled for debug. And it does not stop the program if the file fails to open. In otherwords, its not useful … | |
Re: [URL="http://www.uniqueness-template.com/devcpp/"]Tutorial[/URL] [URL="http://www.google.com/search?hl=en&q=dev-c%2B%2B+tutorial"]Learn to use google [/URL]and you will get the answers a lot faster. | |
Re: Here's another way to use a vector of function pointers. This uses c-style function pointers, and this could probably be simplified too. [code] #include <iostream> #include <vector> using namespace std; int a(float x, char b, char c) { cout << "function a\n"; return 1; } int b(float x, char b, … | |
Re: 1. The second parameter is not a filename, but a structure that contains a lot of fields including the filename. Look up FindFirstFile() in MSDN and you will see that that structure contains. 2. FindFirstFile returns a HANDLE. Setting [icode]this->textBox1->Text = h[/icode] is just flat wrong. you should be setting … | |
Re: [quote]how many times in your life did you have to reinstall windows?[/quote] My life spans 65 years, so its quite a few times. When I was using MS-DOS 6.X I had to reinstall it probably every week or so because my programs would easily trash the file system. Along came … | |
Re: I like my 19" flat-screen monitor because it doesn't take up much desktop room. | |
Re: you could just use WinZip to compress them all into one file then unzip them on the target machine. | |
Re: Probably somewhere in Web Development, or if you are using PHP you could post in Software Development. | |
Re: I got married at 19, so I can't give any advice :) Only had one GF and I married her (she was 18 at the time). And we've traveled the world together these past 46 years. But that was me in 1962. Today, you need more education so at 19 … | |
Re: line 16: variable [b]a[/b] is NOT a string but just an array of characters because it is not null terminated. So string functions such as [b]strlen()[/b] (line 18) and [b]cout[/b] (line 29)will not work with it. To use strlen() you should have declared it like this: [icode]char a[] = "tanka";[/icode] … | |
Re: >> there are no errors when i compile, but the program still doesnt work properly, grrr. frustating. Welcome to the wounderful world of computer programming ;) Sorry that I can't help you -- the math is beyond me. | |
Re: First I would create an array of valid month names, such as [code] string months[] = {"January","February","March" ... }; [/code] Then after the user enter the month name just create a loop and compare them [code] int i; for(i = 0; i < 12; i++) { if( month_name == months[i] … | |
Re: >>str[0] =ffd.cFileName; It depends on how [b]str[/b] was declared. Is it [icode]char str[ <some number here][/icode] or like this: [icode]TCHAR str[ <some number here> ][/icode] It also depends on whether the program is being compiled with UNICODE or not. If you declared [b]str[/b] using TCHAR then you could call [b][URL="http://msdn2.microsoft.com/en-us/library/kk6xf663.aspx"]_tstrcpy[/URL]()[/b] … | |
Re: Can Fly() be called that many times per second ? What will happen if that function is called again before it finishes the first time? | |
Re: Interesting reading and a unique way of presenting a problem, but I'm still not going to do your homework for you. | |
Re: [URL="http://msdn2.microsoft.com/en-us/library/ms682073(VS.85).aspx"]Here[/URL] is a list of all the console functions. | |
Re: Welcome to DaniWeb. I'm sure your expert assistance will be appreciated in the Web Development board. | |
Re: I've never liked American football -- too boring. European football (socker to us Americans) I like alot. So the answer to the poll is NO, I will not, nor have I ever, watched the Super Bowl. Instead I'll watch old Law And Order reruns, or Perry Mason if its on … | |
I was going to make this a reply to another thread but decided not to because it would have hijacked that thread. My favorite ice cream is [URL="http://www.dairyqueen.com/us-en/"]Dairy Queen[/URL], IMO the best danged soft ice cream in the world. Although I haven't tried other kinds the world over, but I'll … | |
Re: [QUOTE=cscgal;524172]I believe that moderators can do this.[/QUOTE] No we can't -- I just tried it and it doesn't work. | |
Re: Is that all there was of the assignment :-O It doesn't contain any instructions, just a few tables. I'll bet you didn't post everything that you were given. | |
Re: >>"john williams" versus john,williams, Because they are not the same -- one has a space and the other contains a comma. lines 4: why are you using variable [b]key[/b] there? Shouldn't it be [b]id[/b] | |
Re: When you read something from a file you can not direct it to two different places at the same time. Read the data into the array then either (1) copy the data from the array into the structure, or (2) after the entire file has been read into the array … | |
Re: The [b]Input[/b] you posted doesn't make sense with the code you posted. The first line after the fgets() is checking characters positions a lot longer then the example input lines you posted. My guess is that the function you posted is not causing the problem. | |
Re: One of your big big problems is code style -- it is absolutely horrible. Here is an example of a better coding style and is a lot easier to read. [code=c++] int password(char usr_name[], char pwd[]) { int j=0,k=0,i=0,m=0,n=0; char corr[9],po[7]; corr[8] = "pizzaboy"; for(i=0;usr_name[i]!='\0';i++) { if (usr_name[i]== corr[i]) n=1; … | |
Re: worked for me using VC++ 2008 Express. What compiler and os did you use? | |
Re: First you have to learn how to read :) See the [b]Read Me[/b] threads at the beginning of this board. | |
Re: On the otherhand there are times when perfection is required. I don't want to jump out of an airplain with a parachute that was folded just "good enough" (I wouldn't jump out of a perfectly good airplain anyway, but you get my drift). | |
Re: [b]OurTimeIs()[/b] has the parameters for the desired hours, minutes, and seconds. So why is it resetting those times to those of the class? What good are the parameters then? If that's what you want, then delete the parameters and use the class time variables directly. If not, then delete lines … | |
Re: >>I am done with the first function No you are not. Did you try to compile it? Probably not. See below for some reasons why. Your password function has several syntax errors: line 4: corr[8]=pizzaboy; What is that??? If you are attempting to declare a character array to contain the … | |
Re: go to some news web site such as [url]www.cnn.com[/url] and select 5 articles. Copy/past a paragraph from each article into your program. In main() make a menu with the 5 titles and number them a) b) c) d) and e). Then ask for title input. After that create a simple … | |
Re: Maybe yes, and maybe no. [URL="http://msdn2.microsoft.com/en-us/library/ms686200(VS.85).aspx"]Here[/URL] is a console function that seems to let you change the font, but I haven't used it so you will just have to experiement with it. | |
Re: [QUOTE=vishalkhialani;525914]I am on windows. Which is the compiler most widely used in the industry ?[/QUOTE] For MS-Windows, Microsoft compilers are naturally the most widely used by professional programmers because, for one reason, MS-Windows was written by Microsoft compilers. [URL="http://www.windowsfordevices.com/news/NS2484248296.html"]Here [/URL]is one testimonial to that statement. Professionals rarly use the Express … | |
Re: Of course face-to-face is more effective because each person can easily size each up like two cocks about to get into a cock fight. You can't always know the other person's intent in the written word, over the phone, or in other forms of communications. [url]http://www.youtube.com/watch?v=0TiprGoV3qQ[/url] | |
Re: >>I get a linker error with the above code What is the error message ? >>So why cant i declare my Employee employee_list[100] in the main.cpp file? I thought you said you are getting a link error? link errors will not produce this error, but a compile error will. What … | |
Re: line 235 (as posted here): [b]left[/b] is not a function or a function pointer so you have to remove the parentheses [icode]postOrderTraversal(subRoot->left);[/icode] | |
Re: why can't the calling function check to see if there are more last names with the same value? [code] int index = searchLN( <parameters here > ); while( inName[index].getlastname() == targetLastName) { cout << inName[index].getlastname() << " "; index++; } [/code] | |
Re: worked ok for me using VC++ 2008 Express on Vista Home Premium. I had to press Ctrl+Z followed by <Enter> keys. | |
Re: There is no one best answer to that question, and every program will be a little different. I would normally put each class in its own header and implementation files, but depending on the size of the class that may not be always necessary either. For non-class functions dividing them … | |
Re: If you work with Microsoft compilers and do any COM programming (such as for distributed processing and inter-language support) you will come across the [b]VARIANT[/b] structure with is nothing more than a structure with two objects: [list] [*]unsigned int type -- declares the type of data contained in the structure … |
The End.