15,300 Posted Topics

Member Avatar for srinath1

>>printf evaluation will be done right to left I think you misunderstood the lecturer.

Member Avatar for sharathg.satya
0
180
Member Avatar for Sariscos

>>Contest details will be announced soon. What's the current status of this contest? It's been 7 months and have not heard anything about it, or maybe I just missed it.

Member Avatar for Ancient Dragon
0
253
Member Avatar for pseudorandom21

[QUOTE=stultuske;1749767] well, you must understand, that the machine you would use as a 'server', you can easily place underneath your desk, while the servers you compare them to were bigger than the room you put your desk in :)[/QUOTE] That reminds me of the first computer I saw, was in …

Member Avatar for jwenting
0
258
Member Avatar for inspire_all

Class definitions are normally put in header files, which are included in the *.cpp file. This is done do that the class can be used anywhere within the program, not just main(). Right now you are probably writing very simple programs that contain only a main() function. What would you …

Member Avatar for Ancient Dragon
0
160
Member Avatar for kspecks
Member Avatar for warlord902

Use a [URL="http://www.google.com/#sclient=psy-ab&hl=en&source=hp&q=version+control+software&pbx=1&oq=version+control&aq=1&aqi=g4&aql=&gs_sm=c&gs_upl=1142l7768l0l10159l21l13l3l5l5l1l535l3551l0.4.6.2.0.1l21l0&bav=on.2,or.r_gc.r_pw.,cf.osb&fp=709f72c2c81dbdf1&biw=1252&bih=570"]version control program[/URL], some are free while others are not.

Member Avatar for peter_budo
0
236
Member Avatar for C++ programmer

Don't let that turn you off -- you can use whatever variable names you want. If you are talking about the data types, then yes you will just have to learn to deal with them. Although DWORD is just a define for unsigned long int, you should use DWORD because …

Member Avatar for thines01
0
254
Member Avatar for C++ programmer

The reason they teach DOS programming is because its a lot easier to learn then win32 api. New programmers don't yet have the skills needed to program win32 api. Another reason may be the old and ancient compilers/IDEs some schools use, such as Turbo C. They are too old to …

Member Avatar for Ancient Dragon
0
142
Member Avatar for Shardendu

Drop both those compilers because they are too old. Get free Code::Blocks (with MinGW compiler) or VC++ 2010 Express. You can easily compile libraries with either of those compilers/IDEs.

Member Avatar for Shardendu
0
152
Member Avatar for morpheus063

The links don't work -- most likely because I'm not enrolled at that school, or the links have changed.

Member Avatar for onenoc
0
391
Member Avatar for MrEARTHSHAcKER
Member Avatar for Despairy

make the vector static. [code] class Players{ public: [color=red]static [/color]vector <strings> info }; [/code] Then in one of the *.cpp files declare it again as if it were a global variable [code] // Players.cpp #include "Players.h" Players::vector<string> info; [/code]

Member Avatar for Ancient Dragon
0
260
Member Avatar for StickyTape
Member Avatar for Crosby Grant
0
2K
Member Avatar for arold10

[URL="http://www.cplusplus.com/reference/clibrary/cmath/fmod/"]fmod[/URL]() is for doubles

Member Avatar for Ancient Dragon
0
122
Member Avatar for sodha125

The posted program doesn't solve the original question, all it does is demonstrate one way to identify vowels. The OP would have to add quite a bit of code in order to complete the assignment.

Member Avatar for KasmIR
0
202
Member Avatar for vyrte

Read [URL="http://linux.die.net/man/2/waitpid"]this[/URL] for return values

Member Avatar for Ancient Dragon
0
128
Member Avatar for lmytilin

Post the code how you got the first part to work. In the second part, create a 2d array of integers and read each integer one at a time using cin's >> operator (that's why I want to see your first code so that I can see how you are …

Member Avatar for Lerner
0
180
Member Avatar for triumphost

sizeof(any pointer here) is always the size of a pointer, on 32-bit compilers it is 4 (bytes). The sizeof operator returns the number of bytes occupied by whatever object you give it, in this case you give it a pointer. >>Shouldn't the size be 10? or the amount of elements? …

Member Avatar for triumphost
0
142
Member Avatar for venky019

Just what do you expect getName() to return in that line? The statement [icode]Sport::getName()[/icode] means that getName() is a static method of the class and [b]name[/b] would also have to be a static member of the class. Probably what you want is [icode]this->getName();[/icode]

Member Avatar for Ancient Dragon
0
3K
Member Avatar for ichigo_cool
Member Avatar for silvercats
Member Avatar for reynaud0000
Member Avatar for Ancient Dragon
0
290
Member Avatar for jonnyboy12

The button is running in the main thread. MFC doesn't create new threads for individual objects (buttons and windows) but has the same message pump that every MS-Windows has. Which MFC class contains the function you want to run on button click? One way to handle that is in the …

Member Avatar for Ancient Dragon
0
218
Member Avatar for richardtreier

libraries with *.a extension were produced with GNU compiler, such as g++ on *nix and MinGW on MS-Windows. They are not usable with Microsoft compilers.

Member Avatar for mike_2000_17
0
109
Member Avatar for bobanderson93

Streams must be passed by reference like you did in main.cpp. So change inventory class like this: [icode]void ReadFromFile(ifstream&);[/icode]

Member Avatar for Ancient Dragon
0
157
Member Avatar for swissknife007

graphics.h is not part of c or c++ standards, so very few compilers support it. On MS-Windows the only compilers I know about that use it are Turbo C, which is ancient and obsolete. If you want graphics on modern operating systems then you need to learn modern compilers. Turbo …

Member Avatar for DeanMSands3
0
844
Member Avatar for Ancient Dragon
Member Avatar for dij_0983
0
106
Member Avatar for swissknife007

graphics.h is not part of c or c++ standards, so very few compilers support it. On MS-Windows the only compilers I know about that use it are Turbo C, which is ancient and obsolete. If you want graphics on modern operating systems then you need to learn modern compilers. Turbo …

Member Avatar for peter_budo
0
677
Member Avatar for silvercats

Depends on the debugger. What IDE/debugger are you using? If you are using debug.exe (which is no longer distributed with MS-Windows) the I think you are correct. When you use the 'l' command to list memory contents debug.exe just gives you a memory dump without regard to what's in it. …

Member Avatar for Ancient Dragon
0
142
Member Avatar for phorce

matrix is a 1d matrix, not a 2d matrix. You can keep it as a 1d matrix if you want to but that means you have to calculate the row and column index yourself. This is one of the rare times I could start the i counter with 1 instead …

Member Avatar for phorce
0
130
Member Avatar for hsayid

I'm no math whiz but isn't that formula the same as R =1 / (r1 + r2 + ... rn) so first you need the values for r1, r2 .. rn. where do those come from? put them into an array then you can easily calculate the formula (this has …

Member Avatar for studentba065
0
6K
Member Avatar for Nandomo

Is this an MFC program, or what? In Windows Forms CloseWindow() only minimizes the window. You want DestroyWindow().

Member Avatar for anuj.juthani
0
3K
Member Avatar for silvercats

I assume you mean 64-bit processors. The answer is yes because they are still in the x86 family of processors. Intel didn't completly replace the 32 and 16-bit processors, they added to them. 64 and 32 bit processors still use the 16 and 8 bit processor instruction set.

Member Avatar for silvercats
0
168
Member Avatar for neeludhiman

Its not as easily accomplished in *nix -- you have to do lots and lots of programming to get that to work in graphics mode. [URL=http://www.opengroup.org/motif/]Motif[/URL] open source package helps a little. Or you might use console-based curses library functions.

Member Avatar for rishabh413
1
17K
Member Avatar for freedomflyer

rohan: you have the right idea, but the code is incorrect. You have to allocate memory for my_strings [code] #include <iostream> #include <cstring> char ** tokenize_urls() { char **my_strings; char *temp[3] = {"first","second","third"}; my_strings = new char*[3]; // allocate memory for the array for(int i = 0; i < 3; …

Member Avatar for Ancient Dragon
0
183
Member Avatar for webecedarian

[QUOTE=vegaseat;1559965]Programming without Google? Hard to imagine![/QUOTE] Weren't you around before the internet? Back then we had to read books and compiler documentation :)

Member Avatar for Netcode
0
230
Member Avatar for gpta_varun

A lot depends on the program you are writing. Two hints: 1. Using c++ std container classes instead of C-style dynamically allocated objects is the first place to start -- assuming your compiler supports those container classes, not all c++ compilers do. 2. If you are writing Microsoft Windows programs …

Member Avatar for MastAvalons
0
206
Member Avatar for GoodLuckChuck

windows 7: use the mouse to highlight the text, press right mouse button, then select Oopy form the menu. Then open Notepad (or some other program) press right mouse button, then select Paste. Done. That method may not preserve formatting (line feeds and tabs).

Member Avatar for jumbowat
0
135
Member Avatar for LeaguePlayer

why do you need that array? they are all consecutive numbers, so you should be able to just calculate the value of freight id based on something else. I have no idea how you can derive freight id from the rest of the data objects in that program. Are you …

Member Avatar for cangan
0
239
Member Avatar for coding101

They are in the libraries, just like the standard C functions. Whether or not you can view the code for those functions depends on the compiler you have. GNU code is free if you download the compiler's source code. The code for other compilers may or may not be free.

Member Avatar for savoie
0
161
Member Avatar for cangan

See [URL="http://msdn.microsoft.com/en-us/library/aa288453(v=vs.71).aspx"]this tutorial[/URL] for C# arrays

Member Avatar for cangan
0
328
Member Avatar for shubham.joy
Member Avatar for vlaskiz

You can convert the string to time_t format so that later a comparison will be trivial comparison of two integers. First populate a struct tm, then call mktime() which will return time_t, something like this [code] // See previous post char* str = "2011-11-21"; tm tm1 = {0}; sscanf(str,"%4d-%2d-%2d",&tm1.tm_year,&tm1.tm_mon,&tm1.tm_mday); tm1.tm_hour …

Member Avatar for Ancient Dragon
0
179
Member Avatar for jaai
Member Avatar for Azmah
Member Avatar for BDove
0
2K
Member Avatar for seriousgeek

You could write the higher level programming language in any human language you want. Whatever human language you want to use would have to compile down to whatever assembly language is used on the target computer. That shouldn't be a proglem either unless you want that assembly language instruction set …

Member Avatar for amaithianantham
0
423
Member Avatar for brendono978

Look at [URL="http://www.asciitable.com/"]any ascii chart[/URL] and you will see the decimal value of all characters 0-255. >> and three squares covered by each tile indicated by a distinct ASCII character starting with !, I have no idea what that means either.

Member Avatar for D_Unforgiven
1
494
Member Avatar for Ancient Dragon

I went to Chester, Illinois (home of Popeye) and took a few photos (only about 150 of them) and posted them on [URL="http://www.facebook.com/?sk=app_2305272732_2392950137"]my Facebook page[/URL]. There's too many to post here at DaniWeb. That town is only about 50 miles from where I live. Next trip will probably be to …

Member Avatar for Azmah
0
134
Member Avatar for guccimane

You are not allowed to change the datatype of an object -- in this case you can't reassign the data type from triangle* to rectangle*. Just use a different variable name for each one. >>I deleted pointer, aka deallocated the memory. delete operator only deletes the memory assigned to the …

Member Avatar for LRRR
0
103
Member Avatar for Ancient Dragon

Yes, I'm starting a little early. Just finished off a bottle of extra-dry Champagne spiked with brandy. I had glasses for Dani, Narue. and Davy. I hope you liked it cause I sure did :) 31 Dec is also my last day at Wal-Mart. I decided to enjoy life for …

Member Avatar for The Dude
4
180

The End.