15,300 Posted Topics

Member Avatar for blackfeather

[sarcasm]Ha Ha[/sarcasm] -- moved to Geek's Lounge because your post was not an introduction.

Member Avatar for replicavertu
-3
56
Member Avatar for duliprb

You need VC++ 2005 or 2008 Pro or better edition because that project uses MFC. Express edition can not compile it. If you have the compiler then just double-click PBXClient.vcproj

Member Avatar for duliprb
0
328
Member Avatar for ankur_

never heard of such a thing, most likely because it would be grossly inefficient. The library at [url]www.DataReel.com[/url] contains client/server code ported to both *nix and MS-Windows, but it uses standard sockets.

Member Avatar for ankur_
0
157
Member Avatar for edwar

[code] int main(int argc, char*argv[]) { ofstream out; if( argc == 2) { out.open(argv[1]); if( !out.is_open()) { cout << "Failed to open the file \"" << argv[1] << "\"\n"; return 1; } { else { cout << "usage: myprog filename\n"; return 1`; } // now write to the file ... …

Member Avatar for Ancient Dragon
0
273
Member Avatar for Gaiety

I've used a debugger to step through some of the printf() code on MS-Windows and found that eventually it calls win32 api WriteFile(). From that experience I would imagine other functions also eventually call win32 api functions. But those are the details that are compiler-implementation specific. There is nothing in …

Member Avatar for Ancient Dragon
0
198
Member Avatar for NinjaLink

line 49 of the *.cpp file -- that should probably be /= operator. When I run your program I get this error [quote] Assertion failed: stackTop != 0, file c:\dvlp\try1\try1\stackarray.h, line 109 Press any key to continue . . . [/quote]

Member Avatar for VernonDozier
0
145
Member Avatar for fivec

>>2.sizeof is compile time operator. what does that mean ? It means that its only evaluated when the program is compiled because the result is a const unsigned int. >>3.what about all other opearators arent they compile time? Sometime yes and sometimes no. The = operator has to be evaluated …

Member Avatar for Tom Gunn
3
158
Member Avatar for platinn

You can turn off precompiled headers by selecting menu item Project --> Settings, select the c++ tab, in "Category" select "Precompiled Headers" then select the "Not using precompiled headers" radio button.

Member Avatar for Muaz AL-Jarhi
0
390
Member Avatar for ankur_

I began learning MFC from Microsoft's [URL="http://msdn.microsoft.com/en-us/library/aa716527%28VS.60%29.aspx"]Scribble Tutorial[/URL]

Member Avatar for Ancient Dragon
0
174
Member Avatar for breckj

1) Either Code::Blocks or VC++ 2008 Express, both are free 2) MS-Windows. *nix has little support for serious games 3) Tons of sites. Can't recommend any because I don't write games. 4) No. It should be in the IT Professional's Lounge.

Member Avatar for Ancient Dragon
0
95
Member Avatar for sha9n
Member Avatar for rechene

[QUOTE=rechene;1022958]need a quick answer[/QUOTE] Then you should have googled for the answer. That question has been asked and answered millions of times.

Member Avatar for Ancient Dragon
-4
49
Member Avatar for chiraag

If you don't free() the memory before leaving that function then yes, there will be memory leak. In c++ program you should use new and delete[] instead of malloc() and free().

Member Avatar for chiraag
0
234
Member Avatar for tiara

>>Is the data structure I used (linked - list ) wrong and not be compatible inside class ? No -- you should be able to use a linked list within a class >> Is there another data structure better than linked-list ? Yes -- use either <vector> (which is an …

Member Avatar for tiara
0
73
Member Avatar for abhipro

If you used g++ on linux then you should probably use Code::Blocks with MinGW compiler on Windows.

Member Avatar for Agni
0
241
Member Avatar for Valaraukar

In sprite.h the vertices and colours arrays can not be initialized in the class like that. It doesn't work the same as global variables. You have to put the initialization code in the class constructor.

Member Avatar for Valaraukar
-1
216
Member Avatar for Galf

[icode] short* pnum = static_cast<short*>(&const_cast<short&>(someFunction()));[/icode] or this [icode] const short* pnum = static_cast<const short*>(&someFunction());[/icode]

Member Avatar for Galf
0
176
Member Avatar for colmcy1

what do you mean by "it is not running" ? Why don't you get rid of that charcater array and read the line directly into the string. [code] string data; while( getline(in, data) ) { // blabla } [/code]

Member Avatar for Ancient Dragon
0
90
Member Avatar for starboy
Member Avatar for tkud

Probably yes, see the functions in graph.h. As for ebooks, you might get some of [URL="http://www.google.com/search?client=firefox-a&rls=org.mozilla%3Aen-US%3Aofficial&channel=s&hl=en&source=hp&q=turbo+c+ebooks&btnG=Google+Search"]these for Turbo C[/URL]

Member Avatar for Ancient Dragon
0
100
Member Avatar for orium

simple -- print spaces instead of '#' characers. We aren't going to actually give you the code, so try it and post your code if you have more problems/questions.

Member Avatar for maverick420
0
1K
Member Avatar for Doughnuts

>>the program adds the last number "5" twice That's because you are wrote the loop incorrectly. Do it like this: [code] while ( InputStream >> n ) { // blabla } [/code]

Member Avatar for Doughnuts
0
119
Member Avatar for klackey19

lines 33 and 34: >>char *c; >>c = &line[0]; That is not necessary. Just pass line.c_str() to the function on line 39 line 71: all you have to do is use isdigit() function [icode]if( isdigit(*c)) [/icode] line 82: get rid of all that crap and use isalpha() [icode]if( isalpha(*c) )[/icode] …

Member Avatar for klackey19
1
537
Member Avatar for program900

you have to keep track of 10 ranges. Every time you generate a new random number check to see which of the 10 ranges it falls in and then increment that counter. Once you get that done and working right it should be not too difficult to print out the …

Member Avatar for Ancient Dragon
0
89
Member Avatar for khimura

Which operator do you need to overload? Such as, do you need to write and read the classes to file? IN that case you could overload the << and >> operators.

Member Avatar for Ancient Dragon
0
115
Member Avatar for Dewey1040

In the two arguments to main(), argc is the number of arguments (command line arguments are separated by spaces or tabs), and argv is an array of the strings. So if you type this [icode]myprog --lines-per-page 30[/icode] argc will be 3 and argv will be argv[0] = program name argvp[1] …

Member Avatar for Dewey1040
0
215
Member Avatar for Toila

The loop starting on line 73 is wrong. eof() doesn't work the way you think. And you don't need that third parameter '\n' to getline() because that is the default. [code] while( getline(nameFile,input) ) { // blabla } nameFile.clear(); // clear error nameFile.seekg(0, ios::beg); // back to beginning of file …

Member Avatar for Ancient Dragon
0
111
Member Avatar for gokhanxyz
Member Avatar for Ancient Dragon
0
82
Member Avatar for Phil++
Re: OOP

With 112 posts I know you know how to use code tags. Then edit your code to correct all the typing mistakes you made when posting those classes.

Member Avatar for Ancient Dragon
-1
121
Member Avatar for edwar

>>ifstream *MyFile; Remove the * -- c++ streams are not normally pointers. >>programname = argv[0]; argv is not a variable declared in t CreateAllNodes() function I think you put that function declaration in the wrong place.

Member Avatar for Ancient Dragon
0
93
Member Avatar for jeeter19

>>I must use Fork() and Wait() Why? Sounds like over complication of the problem. >>myComd is an unallocated pointer which can not be used until you allocate memory to it. IMHO don't make it a pointer; remove the star and replace pointer notation "->" with dot notation "." >> line …

Member Avatar for Ancient Dragon
0
297
Member Avatar for riahc3

It was true a few years ago that VC++ 6.0 was not very standards-compliant compiler. I suspect they got so many complaints about it that M$ decided to make it fully c++ compliant. The problem with Microsoft compilers is that they do not support POSIX standards. So a lot of …

Member Avatar for jeeter19
0
395
Member Avatar for Lohith_prakash

Here you go, now all you have to do is fill in the missing parts [code] #include <string> class Student { // your code goes here }; int main(int argc, char* argv[]) { // your code goes here } [/code]

Member Avatar for Ancient Dragon
-4
49
Member Avatar for Phil++

Is customer_id a string or an integer? [code] int customer_id = 11; char filename[255]; sprintf(filename,"%04d.txt", customer_id); ofstream file (filename); [/code] There are other ways to format the string, but IMHO the above is the simplest.

Member Avatar for Ancient Dragon
0
102
Member Avatar for noi80

>>void matrix_input(int mat[][dim], char* name) What is variable [b]name[/b]? It doesn't make much sense in the context of that function.

Member Avatar for noi80
0
150
Member Avatar for Web_Sailor

You can't just simply ignore it. You have to read it and then don't use it for anything.

Member Avatar for Web_Sailor
0
8K
Member Avatar for peacerosetx

Forget about 2005 Express -- its been updated to 2008 Express. 2008 is a better compiler anyway and doesn't need the Windows SDK in order to produce windows gui programs. But you have to hurry because it won't be available for much longer, as soon as 2010 is released (its …

Member Avatar for peacerosetx
0
207
Member Avatar for Kandeep

you will have to get it as a string, not a double, so that your program can check for extraneous characters, such as "...". If it passes that test then convert to double and check for negative value.

Member Avatar for Dave Sinkula
-1
84
Member Avatar for neithan

Unfortunately AFAIK push_back is the only way to initialize it. The vector is a single object, not an array of objects, so an initialization list is not possible.

Member Avatar for Dave Sinkula
0
611
Member Avatar for gcardonav

[code] 1>c:\documents and settings\myfolder\desktop\mydocs\c\visual\memory\memory.cpp(57) : warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [/code] That is a Microsoft-Specific warning message. M$ doesn't like using the standard C style string functions like strlen(), strcpy() etc …

Member Avatar for seraph03
0
2K
Member Avatar for kustrle

What compiler? Operating system? GUI API ? If you are working with MFC then progress bar isn't all that difficult.

Member Avatar for kustrle
0
127
Member Avatar for Phil++

move line 11 down outside that loop because it is causing the loop to execute only once. Is there more to that function then what you posted? Because it is pretty much a worthless function the way it is posted. Why declare an array of 255 Customer classes when you …

Member Avatar for VernonDozier
0
109
Member Avatar for vandna

Your program is pretty close, you just need a few changes, such as [icode]int main()[/icode], use pointer to array in scanf() and flush out the '\n' characters [code] int main() { int array[50],i,ele,n; char a; //clrscr(); printf("the list should be sorted in ascending order\n"); printf("enter the size of array\n"); scanf("%d%c",&n,&a); …

Member Avatar for Grn Xtrm
-2
132
Member Avatar for needhelpe

Take it in small steps. First write a program that just lets you enter the year. Get that working then add more that lets you enter the month and day of month. If you enter the month as a number you can then create a switch statement that calculates the …

Member Avatar for OSiRiSsk
0
167
Member Avatar for ateeqbkr
Member Avatar for ilovejeju
Member Avatar for The Mad Hatter

[QUOTE=The Mad Hatter;1006497]I'm curious. You seem so sure, but you don't say why, and your assurance is totally at variance with my own experience. In fact I'll state straight out that Linux is easier to use than Windows.[/QUOTE] I tried two different distributions of *nix (Fedora 11 and Ubuntu) over …

Member Avatar for Evenbit
-5
2K
Member Avatar for daviddoria
Member Avatar for StuXYZ
0
132
Member Avatar for ENCHTERP

C language doesn't have a real character data type. [b]char[/b] is just a one-byte integer, and all characters such as '=' are treated exactly like integers. You can safely assign '=' to either a char or int data type (also long, long long, __int64, float or double). You can also …

Member Avatar for ENCHTERP
0
3K
Member Avatar for MichaelSammels

Which those constraints all bets are off. You wrote the OS so you will have to write all the low-level stuff. Does it even support C language? A compiler? How do you run any programs in that os?

Member Avatar for MichaelSammels
0
102

The End.