15,300 Posted Topics

Member Avatar for Acis

So what is the problem? Out of energy? What is that supposed to mean? And the program just goes to the Game Menu because that's exactly what you told it to do (line 35).

Member Avatar for nucleon
0
74
Member Avatar for serkan sendur

Isn't cheating exactly the cause of our global financial crises were are now in? Whats-His-Name started a pyramid scheme that cheated thousands of people out of several Billion dollars? I read an article in local newspaper about a woman in Missouri who did a similar thing but on a much …

Member Avatar for serkan sendur
0
178
Member Avatar for DCvonB

Just count the lines as they are being read [code] std::string line; int counter = 0; while ( getline(myfile, line) ) { ++counter; cout << left << setw(4) << counter << line << "\n"; } [/code]

Member Avatar for Ancient Dragon
0
174
Member Avatar for shevy24

video tutorials are next to worthless. Why? Because its nearly impossible to reference certain material without viewing the entire video! Lets say you are confused about loops, and loops are discussed near the end of a 2-hour video tutorial. Well, would you rather sit there a watch the entire tutorial …

Member Avatar for Spanki
0
212
Member Avatar for deepakps

Any reason you posted that code, which can not be compiled with anything but Turbo C compiler?

Member Avatar for ithelp
0
118
Member Avatar for yuvaraj.tr
Member Avatar for Ancient Dragon
0
80
Member Avatar for toadzky

You put the guards in the *.h files that you wrote, not the STL or other system files. If you are getting errors, then you didn't do it correctly, and you should post the header file w/guards so we can see what you did. [code] //"xmlParser.h" #ifndef XMLPARSER_H #define XMLPARSER_H …

Member Avatar for toadzky
0
194
Member Avatar for billgone

>>char* delString(char s1, char s2) those two parameters are wrong. They should be std::string, not char (which is just a single character)

Member Avatar for Ancient Dragon
0
91
Member Avatar for dharanidaran
Member Avatar for Icebone1000

[QUOTE=Icebone1000;826116]Hi again I opened the new file with word pad, the problem is theres a lot of memory junk being writed on the end of the file (ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ...) lots and lots Any idea of what can I be doing wrong? [/QUOTE] You aren't doing anything wrong. You can't view binary …

Member Avatar for nucleon
0
209
Member Avatar for eviocg

you have to create one big string that includes all the variables [code] #include <iostream> using namespace std; int main(int argc, char *argv[]) { string ip string command; cout << Enter an ip; cin >> ip; command = "ping " + ip; system(command.c_str()); //// this is the problem. how do …

Member Avatar for eviocg
0
99
Member Avatar for rom87

delete and delete[] don't erase the memory locations, only frees it up for other uses as Narue previously said. The data you stored at that location is still there, but delete invalidated the pointer you had. Its always a good rule-of-thumb to reset pointers to NULL after calling delete or …

Member Avatar for Ancient Dragon
0
77
Member Avatar for Kurtismonger

Probably a permissions problem. When doing backups, what account is the backup program running under? It needs to run under an account that has admin permissions on your XP computer.

Member Avatar for Kurtismonger
0
108
Member Avatar for bancje

The COM object I worked with return HRESULT and the BSTR was a parameter [code] BSTR b = 0; HRESULT hr = ComObject->Foo(&b); [/code] But you have to check exposed function prototypes in the COM object's header file.

Member Avatar for bancje
0
102
Member Avatar for Ancient Dragon

[URL="http://www.metacafe.com/watch/716168/beethoven_morse_symphony/"]Beethoven Morse Code Symphony[/URL]. Sorry about the short commercial at the beginning.

Member Avatar for GrimJack
0
41
Member Avatar for rickster11

can you use the functions in time.h? If you can, just populate a struct tm, call mktime() to get the time_t object. Once you have the two time_t objects call difftime().

Member Avatar for vmanes
0
95
Member Avatar for free radical

line 59: why are you attempting to so math on std::string objects? test1 and test2 are std::strings, you can't divide them by 2 then multiply them by 2 like that line is attempting to do.

Member Avatar for free radical
0
119
Member Avatar for monkey_king

all boost libraries have to be compiled on the target machine. [URL="http://www.boost.org/doc/libs/1_38_0/more/getting_started/windows.html"]See this link[/URL]. That is one way they ensure portability. >>Can I simply make a copy of the .hpp file to the project dir, or are boost file too much interrelated? No. You have to build the libraries on …

Member Avatar for monkey_king
0
94
Member Avatar for krutthika

did you [URL="http://lmgtfy.com/?q=C+program+for+audio+compression+and+decompression%3F"]try this?[/URL]

Member Avatar for monkey_king
0
102
Member Avatar for sarawilliam

line 22: fgets() doesn't return '\n'. [URL="http://www.cplusplus.com/reference/clibrary/cstdio/fgets.html"]Read this[/URL] . If the line read contains '\n' then the last character in the input buffer will also be '\n' and in that case you need to strip it off if you want the line to be useful. [code] if( stg[strlen(stg)-1] == '\n') …

Member Avatar for sarawilliam
0
924
Member Avatar for pagu

what compiler and operating system. It could be a limit of your os and/or compiler. Try your program on a 64-bit os, such as 64-bit XP or Vista and see if that fixes it.

Member Avatar for nucleon
0
108
Member Avatar for Sarlacc

you need to write an event handler for each of those buttons. Inside the event handler is where you put the code to load and display the image you want. As I recall, to create an event handler function for a button just right-click the button and you will see …

Member Avatar for Sarlacc
0
160
Member Avatar for deadmancoder

>>is it a big task? Yes -- Microsoft has been developing theirs for some 20 years now. >>can anyone explain me or direct me to a concept that explains this? Just buy the educational version (I assume you are a student, so you are eligible for huge discounts), install, and …

Member Avatar for NicAx64
0
224
Member Avatar for gsingh2011
Member Avatar for nucleon
0
422
Member Avatar for serkan sendur

Theme from piano concerto no.1 , peter Tchaikovsky, for guitar [url]http://www.youtube.com/watch?v=mCLAAAoqhcQ[/url]

Member Avatar for Ancient Dragon
1
668
Member Avatar for PoZHx
Member Avatar for PoZHx
0
802
Member Avatar for shyterrice

You have to read the manufacturer's programmers manual, or call them and ask them.

Member Avatar for Ancient Dragon
0
136
Member Avatar for dev_kc
Member Avatar for lllllIllIlllI

I started a new empty windows project, pasted your code and it compiled without any errors or warnings. When you created your project did you create a console project or windows project. It must be a windows project.

Member Avatar for lllllIllIlllI
0
278
Member Avatar for star4ker

maybe you need to rearrange the program so that it does this [code] Do you want chocolate, vanilla or twist? chocolate hot fudge, chocolate or strawberry sauce? hot fudge Do you want sprinkles (yes/no)? no You ordered chocolate ice cream with hot fudge sauce without sprinkles. Press any key to …

Member Avatar for seanhunt
0
4K
Member Avatar for slik33

[QUOTE=Narue;826340]>int size=0; >int *parr= new int[size]; For starters, size isn't a compile-time constant, which means you're relying on a compiler extension and your code is thus non-portable [/quote] I think you just had a brain fart :) There is nothing wrong with calling new with a non-const integer. Maybe you …

Member Avatar for Narue
0
124
Member Avatar for joed13k1941

Its not necessary to initialize std::strings with blanks because that is the default. Just declare them like this:[icode]std::string softserve, topping, sprinkles;[/icode] I think your program needs more cin statements for data entry.

Member Avatar for star4ker
0
446
Member Avatar for seebharath

I have no idea, but start [URL="http://xerces.apache.org/xerces-c/mailing-lists.html"]here[/URL]

Member Avatar for Ancient Dragon
0
49
Member Avatar for flaco

[QUOTE=Oufrelax;826160]Invision Power Board is a good one, it's also got a lot of free add-ons to add just about any feature you could want. but a Permanent License costs $130. ^^;;; Demo : [url=http://www.forumotion.com]free forums[/url][/QUOTE] vBulletin isn't free either.

Member Avatar for Ancient Dragon
0
118
Member Avatar for kosilence

From [URL="http://secondlife.com/whatis/"]this[/URL], it looks like a game of some sorts to me.

Member Avatar for PerfectMOney
0
158
Member Avatar for mrtsoftware

You can use the division operator / to extract the number of hours and minutes. How many seconds in an hour? How many in one minute? 8230 / (60 * 60) = number of hours

Member Avatar for mrtsoftware
0
96
Member Avatar for Emerald214

use static allocation unless (1) your os and compiler have very limited stack space, or (2) the objects are huge. Declaring STL containers like vector dynamicall is just a waste of time/effort because they only consume about 20 bytes of memory anyway.

Member Avatar for nucleon
0
101
Member Avatar for senidaljeet

Vista has changed a lot of things, one of them is it won't run the graphics programs produced by the old Turbo C compilers. You have to use a new compiler and use normal win32 api graphics functions which are NOT GBI. So you have to just forget everything you …

Member Avatar for ArkM
0
85
Member Avatar for nexocentric

There is no ansi c standard way of flushing the input stream. fflush(stdin) is compiler specific becaue fflush() is only guaranteed to work on output streams such as stdout. If you want a non-standard way to do it you could use fflush(stdin) or functions from conio.h such as [code] while(_kbhit() …

Member Avatar for Ancient Dragon
0
495
Member Avatar for soulreaver20500

>>if (currentfile == "instance") currentfile is an ifstream object, so it can not be compared to a string. Do you mean filename instead of currentfile ? If yes, then you will have to use strcmp() to compare the two character arrays.

Member Avatar for Ancient Dragon
0
104
Member Avatar for maru2

you obviously are not using MS-Windows or *nix operating systems, because the max amount of ram supported by 64-bit MS-Windows is 128 gig. one way to do what you want is to store the data in two or more arrays and use one of the arrays depending on the value …

Member Avatar for StuXYZ
0
216
Member Avatar for MegaDave

integer digits are also characters. For example '0', '1', '2', ... '9' are all ascii characters just as 'a', 'b', ... 'z' are ascii characters. Its quite easy to convert an ascii numeric character to an integer -- just subtract '0' [code] int x = '0' - '0'; // result …

Member Avatar for Ancient Dragon
0
315
Member Avatar for dubster

>>Create a 2d array called alpha with dimensions 5x208 that will contain alphabet characters i.e. That is asking you to create a 2d character array that can contain 5 strings and each string can contain up to 208 characters. Like this: [icode]char alpha[5][208];[/icode]

Member Avatar for tux4life
0
106
Member Avatar for nitheesh.89

>>it should yield a result of product as gud [b]gud[/b] is not in any English language dictionary that I know of, so I have no idea what you mean by that. >>I need a c++ program dealing with sales and marketing First you need to define the problem better. What, …

Member Avatar for siddhant3s
0
95
Member Avatar for bluebird

moved. You didn't say what programming language so I assumed C. Next time don't post tech questions in Geek's Lounge.

Member Avatar for rajenpandit
0
117
Member Avatar for winrawr

I tried compiling that with vc++ 2008 Express, and the Microsoft compiler hates it. It doesn't like the "c\n\t" part.

Member Avatar for winrawr
0
107
Member Avatar for kavithabhaskar

1) it goes negative because there is nothing to prevent it. Its an infinit recursive function -- that is until it consumes all available stack space and then it will simply crash. You need to add a line that stops the recursion when x == 0 (or whatever other value …

Member Avatar for siddhant3s
0
159
Member Avatar for moshe5

1) get rid of strcmpi() C function. See my version of the == operator below. 2) add [icode]#include <algorithm>[/icode] for the transform() function 3) The friend function is not part of the class, so it has to reference the SortedListNode by SortedList::SortedListNode [code] #include <iostream> #include <cstring> #include <string> #include …

Member Avatar for moshe5
0
259
Member Avatar for wonder_laptop

you mean something like this? [icode]char array[16384][8][/icode]? What is a w64 structure?

Member Avatar for Lerner
0
125
Member Avatar for snap!

line 14-17: where SMALL, MEDIUM etc defined ? I think you need to declare just one int variable that can contain the enum variables SMALL, MEDIUM ... [code] enum sizes {NO_SIZE, SMALL, MEDIUM, LARGE, XLARGE}; sizes shirt_size = NO_SIZE; ... if (WEIGHT <=135) shirt_size = SMALL; else if( WEIGHT <= …

Member Avatar for Nick Evan
0
174

The End.