15,300 Posted Topics

Member Avatar for CD-4+

First off, that is a C program, not a C++ program. To fix the errors, declare manager* outside the switch statement. It does no good to declare the pointers like you did because they do nothing and are destroyed as soon as the break statement is executed.

Member Avatar for Ancient Dragon
0
103
Member Avatar for turtail

You said it yourself: Here 'MediumIndication', is a Class, 'mi', 'cs' are object of a class, 'subcribe' is a function, 'getParentModule()', 'getId()' are functions. droppedPacket is also an object of a class. 'bb' is a pointer to a class. I hope it is now clear to you. What more do …

Member Avatar for Ancient Dragon
0
133
Member Avatar for jayson pons
Member Avatar for MrNoob

I think you have to rearrange this into polish notation. For example, if I enter "100 + 2" when the + operator is reached your program attempts to pop two values off the stack, then in fact there is only one value (100).

Member Avatar for MrNoob
0
165
Member Avatar for alishujahx

[QUOTE=alishujahx;966407]I will give you lessons in english and then some assignments. And we will use Microsoft Visual C++ 6.0 as IDE! [/QUOTE] That's a terrible idea:icon_eek: Why not use VC++ 2008 Express, which supports c++ a lot better than that old vc++ 6.0 compiler. Otherwise, I applaud your efforts to …

Member Avatar for ithelp
0
469
Member Avatar for swolll
Member Avatar for Zohar

you don't really need the at() method, just index it just like an ordinary array [icode]if ((setlist[i]==true) && i != setlist.getLargest()[/icode] Notice that method getLargest() does not take any parameters. Also note that getLargest() will return the index value not a value from the array.

Member Avatar for Zohar
0
268
Member Avatar for prinju

If it is a character array then use the functions in string.h header file. strlen() returns the length of a character array while strcmp() compares two character arrays.

Member Avatar for DangerDev
0
91
Member Avatar for suricata
Member Avatar for swolll

what compiler are you using? If it has a debugger then learn to use it so that you can find out what is wrong with your program.

Member Avatar for Ancient Dragon
0
363
Member Avatar for shakunni

you could use 1) ncurses or 2) vt100 mode api calls. There are probably other ways too, such as termcap

Member Avatar for Ancient Dragon
0
53
Member Avatar for The Dude

[b]My Favorite Forums[/b] ??? Yes I like that too. Also like the new rep counters.

Member Avatar for The Dude
-3
111
Member Avatar for loolyn
Member Avatar for Nickair

Yes, it will compile both C and C++ programs. Just name the file with *.c extension and it will be compiled as a C program.

Member Avatar for Nickair
0
103
Member Avatar for MosaicFuneral

I wouldn't pay much attention to that article -- pirated copies are probably very buggy. I will wait until I get my hands on the real thing before making any pronouncements one way or the other.

Member Avatar for Will Gresham
1
196
Member Avatar for Oritm

What's the problem? just replace that static text with a wchar_t* variable [code] TCHAR buf[] = L"lars"; hWnd = CreateWindow( L"3ngine", buf, WS_OVERLAPPEDWINDOW, xPos, yPos, xSize, ySize, NULL, NULL, wc.hInstance, NULL ); [/code]

Member Avatar for Oritm
0
83
Member Avatar for djohnson82

Every program must have one [b]main()[/b] function. The code you posted does not have that.

Member Avatar for djohnson82
1
87
Member Avatar for bigskinny

The instructions seem pretty clear to me. Just do them one at a time, from top to bottom. Do the first requirement, compile, fix error messages, then when that is finished do the next requirement.

Member Avatar for redburn
0
119
Member Avatar for EddieC

That's what C language was supposed to do too, but it doesn't because programs like to interface with the operating systems and the hardware. That makes them os/hardware specific which require program changes when porting from one os/hardware configuration to another. I would expect Voyager 7.2 Pervasive Software Platform to …

Member Avatar for Frederick2
0
194
Member Avatar for ayan2587

An integer can be treated as either decimal, hexadecimal, or octal. As far as the program is concerned they are all the same. Its only us humans who know the difference when they are displayed, such as `cout << hex << number << '\n';`

Member Avatar for ayan2587
0
118
Member Avatar for Mazaoa
Member Avatar for maddy1985
Member Avatar for Frederick2

>>I seem to recall I had to include iostream.h to use the CString class. Do I have that right? No. You need to create an MFC program or a console program that supports MFC. The IDE will generate the files with necessary includes, such as afx.h. 1) There is no …

Member Avatar for Frederick2
0
301
Member Avatar for LaurenR

I think it could be done pretty simply like this: [code] template <class elemType> void arrayListType<elemType>::removeDups(const elemType& removeItem) { int loc; for( loc = 0; loc < length-1; loc++) { if( list[loc] == removeItem) { removeAt(loc); --loc; // repeat last test because item has moved } } } //end remove …

Member Avatar for LaurenR
0
105
Member Avatar for jsapp36

1. That program is not using a "random access file". Those kinds of files are binary files with fixed-length records. What you are doing is sequential access file -- reading from beginning to end in an attempt to find a given record, and the records may or may not be …

Member Avatar for Lerner
0
107
Member Avatar for infern0

Multiple lines of code within if statements must be enclosed in brackets { and } [code] if( condition ) { // do this // do that } else { // do something else } [/code]

Member Avatar for Grn Xtrm
-2
110
Member Avatar for quintoncoert

The value 0xcccccc usually is an uninitialized or bad variable. Its not likely that its the compiler difference, but, if the control is a licensed control then I suspect because the DLL was not installed properly on your computer. If that's not the case then I have no idea about …

Member Avatar for Basicgear
0
589
Member Avatar for hollywoood69

>>I am not sure if i am doing it right, of if i am just way off. Can someone help me? Didn't you run the program? If not, why not ? Don't ask us if your program will work or not -- you can find that out by yourself by …

Member Avatar for Kashaku
0
199
Member Avatar for abhi_marichi

[URL="http://lmgtfy.com/?q=how+to+write+a+compiler"]Start here [/URL]to learn how to write a compiler. If you can not do that simple task then writing a compiler is not for you.

Member Avatar for Ancient Dragon
0
588
Member Avatar for alvalany

>>The problem is that i cant select which one. Whether Visual C or JAVA or python .. "Visual C" is not a language -- its just the name of a compiler. You can use it to compile both C and C++ programs. Why do you have to choose just one …

Member Avatar for inspiron630
0
109
Member Avatar for NICEGUY123

And use code tags -- see that link that says [b][noparse][code][/noparse][/b]? That wasn't put there just for decorations.

Member Avatar for Sky Diploma
-4
111
Member Avatar for oneat

[URL="http://msdn.microsoft.com/en-us/library/ms794193.aspx"]read this article[/URL]. You need to download the Windows DDK.

Member Avatar for Ancient Dragon
0
84
Member Avatar for plcross44

many floating point values can not be represented exactly in memory due to the way they are stored. For a complete explanation [URL="http://en.wikipedia.org/wiki/Floating_point"]read this wiki article[/URL] which will probably tell you a lot more than you dared to know.

Member Avatar for Ancient Dragon
0
84
Member Avatar for sweetsympathy17

[QUOTE=sweetsympathy17;1005890]aahahaha! im not really in on reading rules [/QUOTE] Than I can't be bothered to help you.

Member Avatar for Ancient Dragon
-4
96
Member Avatar for sweetsympathy17

I think you mean nested menus. [code] void menu2() { // do some menu stuff } void menu1() { // display a menu switch (selection) { case 1: menu2(); break; // other choices follow } } [/code]

Member Avatar for William Hemsworth
-1
74
Member Avatar for sweetsympathy17

Stop flooding DaniWeb with that same question. Read the responses you have received in your original thread.

Member Avatar for Ancient Dragon
-4
132
Member Avatar for kn336a

One problem with your program is that the value of MAX may or may not be big enough. If I enter the value 10 then MAX is too large because 10 in binary is only 4 digits (1010). But if I enter the value of 123456 the binary value is …

Member Avatar for kn336a
1
108
Member Avatar for MktgRob

Happygeek is a really big tweetgeek :) I suspect he spends most of his time searching blogs.

Member Avatar for MktgRob
0
158
Member Avatar for jakesee

you have to use pointers to pointers (double stars) [code] const int dataSize1 = 5; const int dataSize2 = 6; void LoadData(char** file, float** data1, float** data2) { // read data size and contents from file *file = new char[255]; strcpy(*file, "This is a test"); *data1 = new float[dataSize1]; *data2 …

Member Avatar for jakesee
0
296
Member Avatar for Ancient Dragon

Can you put a time limit on voting, such as when a time expires then no more votes are possible? Six months seems a reasonable limit. I have seen some of my very very old posts (2-4 years) with votes. The same for applying rep should also apply.

Member Avatar for Dani
-1
96
Member Avatar for adi.shoukat
Member Avatar for William Hemsworth
0
98
Member Avatar for lotrsimp12345

>>Basically the please hit any key to enter doesn't show up in Visual C++.Thanks for help Because you didn't tell it to say that. When you run the program from the IDE, that message appears because the IDE told it to. When you run the program from the command-line that …

Member Avatar for lotrsimp12345
0
195
Member Avatar for C++ Beginner
Member Avatar for Carrots

line 18 has two parameters, line 26 only has one. Never put the function implementation code into a header file because the linker will report duplicate declaration errors.

Member Avatar for Ancient Dragon
0
139
Member Avatar for vandna

Next time use code tags when posting code. That [b][noparse][code][/noparse][/b] link isn't just to make DaniWeb pretty.

Member Avatar for Ancient Dragon
-1
139
Member Avatar for Ancient Dragon
Member Avatar for alvalany
Member Avatar for RossSCann

[QUOTE=RossSCann;1004335]Thanks, I will research that process. How does one gain a trusted certificate?[/QUOTE] Read the link!

Member Avatar for RossSCann
-1
125
Member Avatar for samir_ibrahim

AFAIK we were never able to list just the solved threads. The best you can do is list all the threads that you posted in and the ones you started.

Member Avatar for Dani
0
192
Member Avatar for splurchner

>>while(strcmp(&cmd, "end") != 0) [b]cmd[/b] is declared as a single character, therefore the above line, as well as all other similar lines, are just horseshit. A single character can not contain a string, and any attempt to pass a pointer to a single character to any string handling function such …

Member Avatar for splurchner
0
169

The End.