15,300 Posted Topics
Re: I believe that number also includes all the spammers and porn posters and wouldn't be a bit surprised if they account for about half or more the total membership. Maybe Dani should just delete all those accounts and see what happens to the total membership. | |
Re: If you are looking for a book and have the money then [URL="http://www.amazon.com/Win32-Programming-Addison-Wesley-Advanced-Windows/dp/0201634929"]this is a good one to buy.[/URL] | |
Re: The first error listed is the most important. The problem is more than likely caused by mis-matched brackets, probably missing a closing } somewhere. Start counting open/closing brackets to find out which one is missing. You are also missing brackets around the multi-line else statement on line 64. | |
Re: using one *.cpp as an include in another *.cpp is a BIT NO-NO. Create a project and add both *.cpp files to it. The compiler will compile each *.cpp file and then link them both together, along with other libraries that the program may use. You will see the advantage … | |
Re: This is a prime example of why I hate typdef of plain-old-data-types. It's very difficult to keep track of what's a char* and what's a char**. variable [b]a[/b] is declared on line 9 as char**, and memory allocated for each rows on line 27. So far, so good. No problem … | |
Re: VB can access any dll written in C language, but C++ DLLs have to have special handling, such as the DLL either has to use extern "C" to make the DLL exported functions C style functions or the VB program has to know about name mangling, and you will have … | |
![]() | Re: >>Ok, so time() function (argument being null) returns what? It returns the number of seconds since 1970, as you previously posted. It doesn't matter whether the parameter is NULL or not, it will always return the same value. ![]() |
Re: try using stringstream class [code] #include <sstream> ... std::string line = "8:30 AM"; int hour, minute; std::string ampm; char temp; stringstream s(line); s >> hour >> temp >> minute >> ampm; [/code] | |
Re: you want to rename main.h to myclass.h so that the name of the file tells you what's in the file. Other than that, there is little, if any, difference between the two methods. It's all a matter of programming style. I prefer the first method when one header file depends … | |
Re: win32 project will require you to learn details of win32 api functions. That can be very time consuming with about a year's learning curve to learn it well. You can do useful things in a lot less time than that. Windows Forms is grad-and-drop, but is C++/CLR, not c++. C++/CLR … | |
Re: IMHO the easiest way to count letter frequencies is to use an array of 255 elements -- which is large enough to count all possible characters. Then you can just use the letter itself as the index into the array. Like this simple example: You would put this in a … | |
Re: There's a couple ways to avoid storing that extra '\n' at the end of the text file. One way is like this: [code] ofstream myfile("Stock.txt"); if (myfile.is_open()) { for(int i=0; i <8; i++) myfile << number[i] <<endl; myfile << number[i]; } [/code] | |
![]() | Re: What do you need help with? We can't help you if you can't tell us. |
Re: [URL="http://msdn.microsoft.com/en-us/library/a2c7tshk.aspx"]Here is a Microsoft article[/URL] you will want to study. I'm not sure that C# can access DLLs written by non-.NET languages. | |
Re: What compiler are you using? I compiled with vc++ 2010 express on MS-Windows and did not get any linking errors. | |
Re: line 17: p is an uninitialized iterator so the while statement fails. You might want to initiazlize it to p = NumList.begin() before line 17. That won't fix the problem either. Another problem: what happens when the number of elements in NumList is less than the value of q? In … | |
Re: ReadToEnd() will not read into that String^ vector. It requires a buffer of contiguous memory. If you want to read that file line-by-line then use the example in the link below. [URL="http://msdn.microsoft.com/en-us/library/db5x7c0d.aspx"]Example here[/URL] | |
Re: Your formatting leaves a lot to be desired. It's a lot easier to read and debug if you only put one statement on a line instead of trying to put several on the same line. Most debuggers can't work with that formatting style. Once you learn how to format your … | |
Re: [QUOTE=ziggystarman;1515610]try #include "windows.h"[/QUOTE] Depends on the compiler. That won't work with vc++ 2010 (or any earlier version of Microsoft compilers). On some other compilers it doesn't matter whether you use quotes or angle brackets. Check your computer to see if it already contains windows.h and associated headers/libraries. If it does, … | |
Re: doubles can not be represented exactly in memory. The value of 0.1 may or may not be represented in memory as 0.100001 or something like that, and that's why incrementing 3.9 by 0.1 may cause the number to be greater than 4.0. There is little, if anything, you can do … | |
Re: You need to check the laws of the country in which you are located. Probably ask a lawyer or solicitor. | |
Re: What you are asking is how to reformat a simple text file -- csv files are just text files. Read the file one line at a time, make apprporpate changes then write the new line back out to a different file. If the file is small enough you could read … | |
Re: >>I can not see any right for any government to censur or cut off people from Internet Govenments can do as they please, afterall it is the government that makes the rules. I don't like what some governments to either, but there is nothing I can do about it. I … | |
Re: What compiler are you using? I just successfully compiled/linked using vc++ 2010 Express. First created an empty win32 project, added a *.cpp file and copied your code into it. Compiler and linked without any warnings or errors. Maybe you created a standard console project instead of a win32 project? | |
Re: The "best" way is debatable -- here is one way. [icode] #include <windows.h> #include <stdio.h> void say_hello() { printf("Hello\n"); } int main() { for(;;) { say_hello(); Sleep(1000*10); } } [/icode] | |
Re: >>if (nights<='30') && (nights!='0') Badly formed. You need more parentheses. And a single character can not hold more than one numeric digit, so probably need to test against integers instead of charcters. [icode]if ((nights<=30) && (nights!=0))[/icode] | |
Re: You can't decompile a DLL or *.exe, the most you can hope for is to get its assembly language code. Let's say the name of the original DLL is A.DLL and you want to write B.DLL. All you have to do is have B.DLL call the functions in A.DLL in … | |
Re: std::string.find() does not return an integer -- it returns an unsigned integer. So checking for -1 will not work. It should be checked against std::string::npos. [icode] if( s.find(t1) != string::npos) { } [/icode] | |
Would you put a link to the Top of the page on the bottom of the page like many web sites do? Its annoying to have to use the scroll bar to scroll back up to the top. | |
Re: You failed to include <iostream> and <string> and the [icode]using std::cin;[/icode], [icode]using std:cout;[/icode] and [icode]using std::string;[/icode] statements. | |
Re: [code] int readVal(struct Telem* tm) { scanf("%d%d%d", &tm->entrytime, &tm->cust_num, &tm->waitime); } [/code] | |
Re: Why would I want to copy and run your program? | |
Re: [URL="http://www.google.com/search?source=ig&hl=en&rlz=1G1GGLQ_ENUS397&q=c%2B%2B+pdf+library&aq=1&aqi=g10&aql=&oq=c%2B%2B+pdf"]links[/URL] | |
Re: The only way to run Turbo C on Windows 7 is to install [URL="http://www.dosbox.com/"]DosBox[/URL] and run it from there. MS-Windows no longer supports that old 16-bit code. | |
Re: That doesn't need a computer program. If you enter the numbers from 1-20, then all of them will be in the range 1-50 and none of them will be in the other ranges you mentioned. | |
Re: If you want to prevent someone from entering anything other than numeric digits I would get then to enter a string instead of int, then check the string for digits. [code] char input[255] = {0}; // input buffer char *ptr; printf("Enter a number\n"); fgets(input,sizeof(input),stdin); // get keyboard // now strip … | |
Re: I think you will find all the installed services in the registry HKEY_LOCAL_MACHINE/System/CurrentControlSet/Services | |
Re: If you already know a little about VB6 and VB.NET then you have probably mastered the basic concepts of variables and loops. You might want to begin learning C and C++, it doesn't matter which one you learn first. | |
Re: You mean you want to write one, or do you want to find out if there already is one? >>(my windows compiler is visual c++ 6) You should replace it with VC++ 2010 (the Express version is free). | |
Re: [URL="http://www.daniweb.com/software-development/cpp/threads/354015"]Is this the same problem you had 3 days ago?[/URL] | |
Re: You can use Task Manager to kill the process. Ctrl+Alt+Del will bring up the task manager. | |
Re: [code] int* a = new int[4]; // allocate memory for 4 integers a[0] = GetParentVar1(); a[1] = GetParentVar2(); a[2] = GetParentVar3(); a[3] = GetParentVar4(); return a; [/code] | |
Re: >>avg = ass_average(int num_students, int j); When you call a function you do not put the variable types as part of the parameters. That's only for function prototypes. All you have to do it put the variable names as the parameters, like this avg = ass_average(num_students, j); | |
Re: vc++ 2010 express or Code::Blocks. Both are good C and C++ compilers with good debuggers. I prefer VC++, but for portability between MS-Windows and *nix you might want to do with Code::Blocks. | |
Re: I have no idea what a "student information portal" is, but from your description I would start out by coding the structure and unions. The instructions you were given most likely tell you what they should contain. As for next and previous page, write yourself a little console program that … | |
Re: The earth will end in fire. Everyone now knows that our Sun will exhaust all energy and go super nova some day, and when that happens the Earth and all other planets will burn to a crisp. | |
Re: >>Well, then what is the point of being NULL? Why set it to zero? In c++ NULL is just a macro (see [URL="http://en.wikipedia.org/wiki/C_preprocessor"]this link[/URL] if you don't know what a macro is) that is defined to be 0. Normally NULL is used to initialize pointers to a known address so … | |
Re: [QUOTE=DJSAN10;1504204]m a bit confused...how can it b written in C coz again u will need a C compiler to compile it.. also if it is written in assembly..then how can the code run on different machines..i mean,assembly language would be different for different architectures,won't it..??[/QUOTE] printf() is not a built-in … | |
Re: Also tell us the purpose of the program, what its supposed to do. AFAIK the program is supposed to count the number of cats that fall from the sky when "its raining cats and dogs". |
The End.