15,300 Posted Topics
Re: [QUOTE=Mahen]How to decrease the amount of memory that a process/executable consume?[/QUOTE] write less code :D look at the largest function(s) and see how (or if) they can be reduced. | |
Re: what dao classes are you using -- Microsoft MFC classes, some classes that you wrote, or something else? If something else then post a link to them. | |
Re: [URL=http://www.google.com/search?hl=en&q=how+to+send+email+with+c%2B%2B&btnG=Google+Search]Here[/URL] is a good one that is generic to any MS-Windows 32-bit compiler. | |
Re: did you try right-click on the start bar and select Task Manager from the popup menu? | |
I just got a VC .NET 2003 compiler and want to learn C# programming. What books would you recommend? I've been reading the book reviews on amazon.com and there appears to be a lot of good books -- or so the readers claim. I'm not at all interested in "C# … | |
Re: It depends on the operating system you are using, and sometimes the database. In MS-Windows, the most common way of accessing databases is through the ODBC driver. You can use raw ODBC API functions or one of the serveral free c++ classes found by searching [URL=http://www.google.com/search?hl=en&q=odbc+c%2B%2B+classes&btnG=Google+Search]google[/URL] | |
Re: [QUOTE=vegaseat]Now you got me started, for swapping either integers or floats this will work too ...[/QUOTE] Starting with your example, you could use a c++ template. [code] #include <iostream> #include <limits.h> using namespace std; template<class T> swapm(T &a,T &b) { a = a + b; b = a - b; … | |
Re: You didn't mention the operating system you are using. If MS-Windows, then you can use _findfirsrst() and _findnext() to transverse through the file system. When a sub-directory is found, just merly make a recursive call to the function. *nix is somewhat different. It uses opendir() and readdir(). I don't know … | |
1. Once we have attached something to a thread is there any way to delete the attachment at some later date? since we have a limited amount of space for attachments how do we clean this up for future use? 2. I added a new contribution to Code Snippets but … | |
Re: I assume you are writing a C program, not C++. If this is a c++ program then you should not be using C-style buffers at all -- use std::string and std::stringstream. One way to avoid buffer overflow is to make the arrays bigger -- there is nothing at all wrong … | |
Re: post the program that saves the variables. Were the variables written in their ascii format or binary format? If ascii, did you put one or more spaces between them? of just jam them all up together. Open the file in Notepad or some other text editor -- can you distinguish … | |
| |
Re: Dave -- why are you being so polite and nice? just delete this offending thread :) | |
Re: [QUOTE=deepakkrmehta]hello sir [/QUOTE] I realize you mean well, but there are a few women here too. And this isn't the Navy where both men and women officers are called "Sir". No need to be so stiffly formal on any of these forums. :D | |
Re: The results of that program is unpredictable, undefined, and compiler implementation dependent. So one compiler may give one result while another compiler may give other results. why? because the compiler may, or may not, push the results of the pointer operations onto the stack after each operation. Its entire possible … | |
Re: [b]garbage in, garbage out.[/b] printf() is a function that returns an int which is the number of characters printed. cout is a c++ class that returns a reference to ostream object. printf() and cout are two entirely different things which do something similar but have different return values. Putting cout … | |
Re: you need to make Size() method const [code] inline int Size() const; //to find the length of pData; [/code] | |
Re: Its called [URL=http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/shell/programmersguide/shell_intro.asp]Shell Programming[/URL] Google for "windows shell programming" and you will get other hits too that explain with examples. | |
Re: that is probably their own function -- there is no such function in either c or c++. | |
Re: you must include stdafx.h before any other header files in the *.cpp file(s) -- or turn off precompiled heaters. | |
Re: you can't control the time because, as you found out, the os will change it when the file is closed. [quote=MSDN] Not all file systems can record creation and last access time and not all file systems record them in the same manner. For example, on Windows NT FAT, create … | |
Re: in the default constructure allocate the array with max number of doubles. function add_item is all f**ked up. change the name to list::add_item and delete all its contents. if size == MAX_LIST_SIZE then reallocate the array, otherwise just insert the new number into list[size++]; | |
Re: you can use javadoc notations in any program file written in any computer language. Not sure what program reads them and creates the html file. I had to make javadoc comments in my programs about a month or so ago, but I did not have to create the html files. | |
Re: [code] if( *src <= '9' ) [/code] what if *src < '0' ? isdigit() will catch that, but your if statement won't. | |
Re: there are a lot of unprintable characters between 0 and 255. Look at any ascii chart such as [URL=http://www.lookuptables.com/]this one[/URL] and you see that printable chars start with decimal value 32 (a space) and ends in decimal value 126 the tilda ~. Values above and below those two values may … | |
Re: Your hard drive might be perfrectly ok. I had something similar happen to me just a couple days ago after an storm flickered the electricity off and on. I have my computer plugged into a power strip -- all I had to do was plug the computer into a different … | |
![]() | Re: A c++ class is just a way to organize data and associated methods. Whole books have been written on the subject so there isn't enough time or bandwidth to explain them here. I'm sure if you open your text book it will explain them. |
Re: you have not coded the implementation of interval_since(). ![]() | |
Re: use console functions such as SetConsoleCursorInfo(). see MSDN for details | |
Re: [QUOTE=firato] Anyone know how to deal with this?[/QUOTE] change the file extension :?: | |
Re: you are using c++ -- why are you mixing c-style char arrays when you could be using std::string class that will do all the allocation for you. Post your class and we'll see how to get rid of those char arrays! | |
Re: always have an antivirus program running on your computer while online. it won't protect against spyware but will catch most viruses. Both Norton and McAfee are excellent. [URL=http://antivirus-software.6starreviews.com/?Refer=GoogCT&Keyword=antivirus%20comparisons]Here[/URL] are some product reviews. | |
Re: what speed CPI? how old is the video card? [quote]i have a gig of ram and 200 mb of memory. any suggestions?[/quote] which is it? 1 gig or 200 mb ram? | |
| |
Re: you will probably get better response on the C/C++ board. | |
Re: functions in <ioman>. [URL=http://www.cplusplus.com/ref/iostream/ios_base/fmtflags.html]Here[/URL] are other values that can be used for setioflags function. [code] #include <iostream> #include <iomanip> using namespace std; int main() { float n = 123.456F; // output float with 5 decimal places cout << setprecision(5) << setiosflags(ios_base::fixed) << n << endl; return 0; } [/code] | |
Re: did you compile and run your program? If not, then you should do so to see the output. But for now, I would change "while(frue)" to something that will limit the output to the first 10 numbers or so and then quit on its own. It will make debugging a … | |
Re: the digits in the file have to be converted to binary when inserting them into an int array. For example the string "123" can be converted to it like this [code] char nm[] = "123"; int n = 0; for(i = 0; nm[i]; ++i) n = (n * 10) + … | |
Re: If you don't already have it (and you should have it in your textbook) [URL=http://www.python.org/doc/current/ref/strings.html]here[/URL] is a list of valid escape characters. So, for example, if the character read from the file is a 't', then your program will output "\t". If the character is non-printable -- use isprint() macro … | |
Re: what makes you think clear() is not releasing all the memory? The way you are using swap() probably desn't work either (my guess) because there is no real vector. Try this simple example -- there will be no output because after clear() the vector is empty. [code] int main() { … | |
Re: first make sure your computer meets minimum specs for XP. See Microsoft's [URL=http://www.microsoft.com/windowsxp/pro/upgrading/advisor.mspx]Windows XP Upgrade Advisor[/URL] also read [URL=http://www.winsupersite.com/showcase/windowsxp_sg_9xupgrade.asp]this[/URL] if you havn't already. | |
Re: why are you reformatting the hard drive that often??? Are you getting a lot of viruses? If yes, stop visiting all those pron sites :cheesy: I've had mine installed over 3 years now and never reformat/reinstall the os. Reformatting the hard drive just to improve performance does little, if any … | |
Re: depends on you. how easily do you learn new programming languages? My opinion: c++ is more difficult to learn mainly because it will let you stab yourself in the back. If I were you, I would learn both languages -- but not at the same time. | |
Re: [QUOTE=mugilan]can anybdy help on this question......write a program that uses a for statement to calculate and print the average of several integers. assume the last value read is the sentinel 9999. a typical input sequence might be. 10.....8......11.....7.....9.......9999[/QUOTE] why are you hijacking this thread? create your own new thread. :( | |
Re: Actually, VB6 is rarly used outside educational institutions. If you want to make programming a professional career you will have to learn c++, and learn it pretty thoroughly. Most software houses use c++, but M$ Visual .NET is picking up speed. | |
Re: does your computer meet minimum [URL=http://www.microsoft.com/windowsxp/pro/evaluation/sysreqs.mspx]system requirements[/URL] ? also check out hardware compatability lists | |
![]() | Re: A factorial is n * (n-1) * (n-2) * .... so all you need is a simple loop to calculate the factorial [code] long n = 5; long total = 1; while(n > 1) { total = total * n; --n; } // output result cout << total << endl; … |
Re: since you are using dev-c++ compiler I assume you are programming on some version of MS-Windows operating system. See win32 api function MoveFile() or MoveFileEx(), which will move a file or an entire directory. | |
Re: please help me with this.. (this s the function)- i don't know how to construct a code to test if array integer is empty using bool..pls help me.. (this s the function)- pls also include the main.. thanks bool isArrayIntEmpty(int *numbers) This is the third time I've seen this question … | |
Re: on modern MS-Windows and compilers -- they don't work. Those two functions are no longer supported. |
The End.