15,300 Posted Topics

Member Avatar for Mahen

[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.

Member Avatar for Drowzee
0
175
Member Avatar for kavsak

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.

Member Avatar for kavsak
0
115
Member Avatar for Mahen

[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.

Member Avatar for bumsfeld
0
180
Member Avatar for hammy

did you try right-click on the start bar and select Task Manager from the popup menu?

Member Avatar for dlh6213
0
758
Member Avatar for Ancient Dragon

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# …

Member Avatar for Toulinwoek
0
159
Member Avatar for aripaka

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]

Member Avatar for proghelper
0
256
Member Avatar for sara.rythm

[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; …

Member Avatar for Dave Sinkula
0
943
Member Avatar for jasna

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 …

Member Avatar for jasna
0
175
Member Avatar for Ancient Dragon

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 …

Member Avatar for Ancient Dragon
0
126
Member Avatar for Drowzee

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 …

Member Avatar for Drowzee
0
2K
Member Avatar for evilsilver

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 …

Member Avatar for Ancient Dragon
0
85
Member Avatar for shashankk
Member Avatar for kc0arf
0
385
Member Avatar for leonn

Dave -- why are you being so polite and nice? just delete this offending thread :)

Member Avatar for kc0arf
0
99
Member Avatar for deepakkrmehta

[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

Member Avatar for Ancient Dragon
0
115
Member Avatar for Busted

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 …

Member Avatar for Ancient Dragon
0
95
Member Avatar for harshchandra

[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 …

Member Avatar for harshchandra
0
201
Member Avatar for neologic

you need to make Size() method const [code] inline int Size() const; //to find the length of pData; [/code]

Member Avatar for Stoned_coder
0
123
Member Avatar for tayspen

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.

Member Avatar for tayspen
0
237
Member Avatar for JuanPabloD

that is probably their own function -- there is no such function in either c or c++.

Member Avatar for Ancient Dragon
0
147
Member Avatar for Drowzee

you must include stdafx.h before any other header files in the *.cpp file(s) -- or turn off precompiled heaters.

Member Avatar for Drowzee
0
108
Member Avatar for akoloff

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 …

Member Avatar for Ancient Dragon
0
165
Member Avatar for konacious

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++];

Member Avatar for Ancient Dragon
0
139
Member Avatar for vancasas

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.

Member Avatar for Sutanu
0
112
Member Avatar for Sutanu

[code] if( *src <= '9' ) [/code] what if *src < '0' ? isdigit() will catch that, but your if statement won't.

Member Avatar for Sutanu
0
2K
Member Avatar for nico

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 …

Member Avatar for Sutanu
0
5K
Member Avatar for johann59

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 …

Member Avatar for Kintak
0
200
Member Avatar for iamthwee

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.

Member Avatar for proghelper
0
383
Member Avatar for konacious
Member Avatar for iamthwee
0
326
Member Avatar for sleevetrick
Member Avatar for sleevetrick
0
1K
Member Avatar for firato

[QUOTE=firato] Anyone know how to deal with this?[/QUOTE] change the file extension :?:

Member Avatar for tayspen
0
84
Member Avatar for Drowzee

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!

Member Avatar for Ancient Dragon
0
317
Member Avatar for 2wenty thre3

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.

Member Avatar for pcschrottie
0
405
Member Avatar for tom14h

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?

Member Avatar for nanosani
0
152
Member Avatar for thiru.y
Member Avatar for Ancient Dragon
0
615
Member Avatar for johnroach1985
Member Avatar for johnroach1985
0
198
Member Avatar for altheastronut

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]

Member Avatar for altheastronut
0
354
Member Avatar for mugilan

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 …

Member Avatar for nattylife
0
1K
Member Avatar for BioTechNoob

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) + …

Member Avatar for Ancient Dragon
0
300
Member Avatar for sx3

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 …

Member Avatar for Ancient Dragon
0
152
Member Avatar for Daishi

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() { …

Member Avatar for Daishi
0
234
Member Avatar for Buffett

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.

Member Avatar for Ancient Dragon
0
153
Member Avatar for cargenius42

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 …

Member Avatar for Ancient Dragon
0
159
Member Avatar for ayk-retail

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.

Member Avatar for jwenting
0
155
Member Avatar for paladin4service

[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. :(

Member Avatar for Ancient Dragon
0
249
Member Avatar for switty

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.

Member Avatar for switty
0
97
Member Avatar for gene1951

does your computer meet minimum [URL=http://www.microsoft.com/windowsxp/pro/evaluation/sysreqs.mspx]system requirements[/URL] ? also check out hardware compatability lists

Member Avatar for Ancient Dragon
0
129
Member Avatar for iamthwee

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; …

Member Avatar for bops
0
387
Member Avatar for bops

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.

Member Avatar for bops
0
291
Member Avatar for hill0ster

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 …

Member Avatar for Narue
0
476
Member Avatar for sumit

on modern MS-Windows and compilers -- they don't work. Those two functions are no longer supported.

0
79

The End.