15,300 Posted Topics

Member Avatar for NHONORE

Please deposit $10,000 USD in my paypal account and you will get your program.

Member Avatar for Ancient Dragon
0
59
Member Avatar for bijayswain

[code] std::string ip1,ipc1; cout<<"Enter the Ip Address:\t "; cin >> ip1; ip1 = "ping " + ip1; system(ip1.c_str()); ipc1 = "nbtstat -A" + ip1; system(ipc1.c_str()); [/code] The above won't work. Why? Think about the value of string ip1. After [icode]ip1 = "ping " + ip1"[/icode] the string is something like …

Member Avatar for alvinwong
0
110
Member Avatar for evilsweeps

replace KeyType with int to see what happens. >>void main() [URL="http://www.gidnetwork.com/b-66.html"]Its [b]int main()[/b][/URL]

Member Avatar for evilsweeps
0
272
Member Avatar for Ancient Dragon

What is that green tweet button with a number next to it used for? (located just under "Business Exchange" menu) Sometimes I see a 1 and other times a 0. Does that just mean Dani has posted something on tweeter.com?

Member Avatar for Dani
0
55
Member Avatar for bijayswain

What is wrong is that you are using some crappy compiler such as Turbo C to run an MS-Windows 32-bit program. Can't be done. Toss out that compiler and use a modern compiler such as Code::Blocks (with MinGW compiler) or VC++ 2008 Express -- both are free. Also: the / …

Member Avatar for Ancient Dragon
0
1K
Member Avatar for Agni

You did not post anything that needed an assignment operator =. Assignment operators are not used in class declarations. Maybe you mean the overloaded = operator??? Your class doesn't have any public members, so none of its objects (p1 and p2) can be accessed outside the class.

Member Avatar for Dave Sinkula
0
153
Member Avatar for The Dude

You need an account on tweeter.com to make that work. It worked for me. BTW I'm Superman :)

Member Avatar for Ancient Dragon
0
148
Member Avatar for nschessnerd

It all depends on your compiler's memory allocation algorithms. Some compilers to not return deallocated memory to the operating sytesm; instead they keep it so that it can be reused.

Member Avatar for Narue
0
138
Member Avatar for FlashCreations

You can specify the language, such as [noparse][code=html][/noparse]. I don't know if you can successfully specify more than one language in the same post -- you'll just have to try it and find out what it does.

Member Avatar for Ancient Dragon
0
139
Member Avatar for saintrenz

1) Line 13 is wrong. It should use the == boolean operator, not the = assignment operator. >>If not, specify a situiation in which this version will fail. I can think of three kinds of data for which that algorithm will fail. If you think about the different kinds of …

Member Avatar for saintrenz
0
105
Member Avatar for s8498

>>Mm..I'm not sure how to edit my post? There is a time limit. You have 30 minutes to edit a post. >>I still can't figure out how to read 24 lines at a time Just put getline() in a loop. Note that testing end-of-file with eof() is not necessary nor …

Member Avatar for UberJoker
0
2K
Member Avatar for donaldw

>>I'm using VC++ 6.0. You won't be able to use that compiler if you think you need to write 64-bit code. Upgrade to vc++ 2008 Pro or the new vc++ 2010 Pro (the Express versions are not adequate either because they don't produce 64-bit code). I know you can create …

Member Avatar for donaldw
0
117
Member Avatar for kimjan

Do you mean you read a c++ tutorial (you did NOT write it), and you want to know how to compile it? What compiler do you have? Each compiler is different.

Member Avatar for Ancient Dragon
0
80
Member Avatar for nikoo718

There is no standard way of doing that in C language. But one method is to use non-standard conio.h function getche(). If your compiler supports that function then you can use this program to find out what values your keyboard sends for any key on the keyboard, including arrow keys. …

Member Avatar for Ancient Dragon
-3
88
Member Avatar for darkunknown

You have to write two different functions, then in one of them you can call the other, like this [code] int foo() { return 5; } int main() { int x = foo(); } [/code]

Member Avatar for Ancient Dragon
0
103
Member Avatar for ThomsonGB

The general way to get the file size is to seek to the end of the file then get the current file position. I don't know how you would do that with CLR/C++ (managed code), but I'm certain if you read the available methods in FileStream you will find it.

Member Avatar for ThomsonGB
0
228
Member Avatar for lkegley

I don't see any syntax errors, assuming array Games is part of that class or a global variable. But the function won't work. Why? See line 5.

Member Avatar for Lerner
0
103
Member Avatar for kungfudoug

Post #2 of [URL="http://www.dreamincode.net/forums/index.php?showtopic=144998&hl="]this thread [/URL]contains an algorithm you will need if you want to use a dynamic-sized array instead of a vector. Reallocating memory to expand the array's size can be a little complicated to understand for new programmers, so using a vector would be ideal.

Member Avatar for Bench
0
115
Member Avatar for bijayswain

[code] #include <iostream> #include <string> using namespace std; int main() { std::string ip1; cout<<"Enter the Ip Address"; cin >> ip1 ip1 = "ping " + ip1; system(ip1.c_str()); return 0; } [/code]

Member Avatar for Bench
0
100
Member Avatar for RexxX

[QUOTE=sillyboy;474689]Oh, where is the explanation? :([/QUOTE] In the ISO standards -- read Salem's post above, but I guess you did not or you would not have asked this question.

Member Avatar for Narue
0
139
Member Avatar for Iam3R

you forgot the [b]case[/b] keyword. Your program contains millions of other errors that you need to correct -- if your compiler doesn't report them then toss out that crappy compiler and get one that actually works right. [code] int area(shape *s) { switch(s->st) { case RECTANGLE: return (s->shape_u.rect.side1) * ( …

Member Avatar for Iam3R
0
94
Member Avatar for gehring

Did you try [icode]your2darray[y][x] = "Hello";[/icode] or this? [code] vector<CString>& s = your2darray[y]; s[y] = "Hello"; [/code]

Member Avatar for Ancient Dragon
0
297
Member Avatar for agoessling

One way might be to enhance the daemon to listen on a socket in another thread and the other program can open the socket and send daemon some information.

Member Avatar for Ancient Dragon
0
140
Member Avatar for C++ Beginner

Functions know nothing about variables declared in other functions. If you want selectionSort() to use variables in another function then those variables have to be passed to selectionSort() as parameters.

Member Avatar for C++ Beginner
1
231
Member Avatar for bottledwater

There is no quick and easy solution because graphics is a complicated topic. You could do it by calling win32 api functions -- such as [URL="http://www.google.com/search?client=firefox-a&rls=org.mozilla%3Aen-US%3Aofficial&channel=s&hl=en&source=hp&q=win32+api+tutorial&btnG=Google+Search"]this intro tutorial.[/URL] Or you could do it with a different language, such as CLR/C++, or C#, or VB.NET. Graphics is going to take a …

Member Avatar for Ancient Dragon
0
161
Member Avatar for prashant0784

Maybe [URL="http://lmgtfy.com/?q=solaris+file+system"]this will help you[/URL].

Member Avatar for Ancient Dragon
0
237
Member Avatar for happymadman

The only ways for Player to access functions in Map is one of the following [list=1] [*]Player is derived from Map, such as [icode]class Player : public Map[/icode] [*]The functions in Map are static and public. [*]Player contains an instance of Map. [/list]

Member Avatar for valtikz
0
117
Member Avatar for oneat

What operating system? If MS-Windows then use win32 api mouse functions.

Member Avatar for oneat
0
100
Member Avatar for miskeen

The [b]extern[/b] keyword must be used in header files like global.h to avoid duplicate declaration errors when you include the header file in two or more .c files.

Member Avatar for gerard4143
0
932
Member Avatar for Skeen

If you intend to modify Andy's contents from different threads then you need to synchronize the threads so that access to Andy is limited to one thread at a time. The most common way is via [URL="http://msdn.microsoft.com/en-us/library/ms682438%28VS.85%29.aspx"]semiphores[/URL]. For platform independece -- you might check out the [URL="http://www.boost.org/doc/libs/1_41_0/libs/libraries.htm#Memory"]Boost libraries[/URL] to see …

Member Avatar for Skeen
0
219
Member Avatar for alkeshtech

I don't know about other languages, but in c++ I think it is always possible to remove it, because there is such a thing as namespaces and function overloading. Often an "ambiguous" error message means there is a programming error in the parameters (such as mis-matched data types) and the …

Member Avatar for alkeshtech
0
77
Member Avatar for HaveHave2222

>>In the case of 'c++' the VM (Virtual Memory) and PM (Physical Memory) becomes larger every minute. Memory leak. Check your program for memory allocations that were not freed before a function ends. Quite possibly in pPaymentAcsPtr->CheckCardBefore() since your program is calling that function 150,000 times :icon_eek:

Member Avatar for HaveHave2222
0
125
Member Avatar for Iam3R

Hint: See the example program at the end of [URL="http://msdn.microsoft.com/en-us/library/2e70t5y1%28VS.80%29.aspx"]this article[/URL]

Member Avatar for gerard4143
0
144
Member Avatar for eduard77

wtf??? FoxPro and VS are two completly different things. FoxPro is a database, VS is a compiler.

Member Avatar for pritaeas
-3
33
Member Avatar for HITMANOF44th

1) you can not compare a single character such as aData with a string such as "Exit". 2) 'Exit' must be surrounded with double quotes, such as "Exit".

Member Avatar for HITMANOF44th
0
126
Member Avatar for laconstantine

The is setting up the function's stack, allocating local variable space on the stack, and initializing them with 0x0c for debug purposes (helps to detect buffer overflows). Similar code is at the beginning of every function.

Member Avatar for Ancient Dragon
0
205
Member Avatar for Derp2000

What you need is an array of character pointers. When you enter the number of strings then allocate that many character pointers [code] char** array = 0; int numNames = 0; printf("How many names will you be entering?\n"); scanf("%i", &numNames); if( numNames > 0) { array = malloc(numNames * sizeof(char*)); …

Member Avatar for Derp2000
1
125
Member Avatar for sidra 100

[URL="http://www.daniweb.com/forums/misc-explaincode.html"]Read this link (click here)[/URL]

Member Avatar for Ezzaral
-4
55
Member Avatar for crunchie

Posting an up vote is not going to erase that down vote. You will still have the down vote.

Member Avatar for Nick Evan
0
118
Member Avatar for ArtphotoasiA

Going from XP to Win7 can be somewhat rough because things have moved, such as your home directory is not where it was in XP. Also if you get a computer with 64-bit motherboard then you will have 64-bit Win7, which in itself if quite nice. 64-bit Win7 is a …

Member Avatar for ArtphotoasiA
0
121
Member Avatar for jephthah

Would you believe there are still a few commercial manufacturers who still use computers that run ancient MS-DOS 6.X operating system. I know of at least two who are still running some old MS-DOS programs that I wrote 12+ years ago. One reason they are still using them is because …

Member Avatar for jephthah
2
139
Member Avatar for daviddoria

What is going on in that code is called [b]undfined behavior[/b] and will not work. Why? Because [b]ptr[/b] is an uninitialized pointer, and dereferencing it like [icode]*ptr = (put anything here)[/icode] is illegal and will most likely crash the program. The second problem with that code snippet is [icode]*color++;[/icode] on …

Member Avatar for kvprajapati
0
131
Member Avatar for travism

Here is another way to do it. [code] string space2underscore(string text) { for(int i = 0; i < text.length(); i++) { if( isspace(text[i]) ) text[i] = '_'; } return text; [/code]

Member Avatar for travism
0
7K
Member Avatar for Vita1ity

There are several sort algorithms you could use, the[URL="http://www.cprogramming.com/tutorial/computersciencetheory/sorting1.html"] bubble sort [/URL]is ok for small arrays like yours.

Member Avatar for Ancient Dragon
0
40
Member Avatar for dalymiddleboro

>>int OptionMenu(int); Since that function is returning the option selected there is no need to pass any parameters to it. Then in main() just write [icode]menunumber = OpenMenu(); [/icode]

Member Avatar for mrnutty
0
116
Member Avatar for lotrsimp12345

There is no need for the pack() functionality. The account class is already packed (fixed-length). Just write the account object to a binary file. [code] void write(Account& obj) { ofstream out("filename.dat", ios::binary | ios:: app); out.write( (char*)&obj, sizeof(Account)); out.close(); } [/code] similar to read it [code] void read(vector<Account>& accountList) { …

Member Avatar for Ancient Dragon
0
322
Member Avatar for EngneerNitemare

1) delete lines 10-36 because they are redundent. The array [b]counts[/b] was already populated with the correct values in line 9 and there is no point doing it all over again. 2) line 44 -- that's almost an infinite loop. On every loop iteration the value in counts[i] changes. When …

Member Avatar for mrnutty
0
139
Member Avatar for aitrade

[code] char direction[4]; // in or out char type[8]; // such as int, char, etc char name[25]; // variable name char value[10]; char filler; // just ignore the = symbol while( in >> direction >> type >> name >> filler >> value ) { // do something with this information …

Member Avatar for aitrade
0
75
Member Avatar for etsayhaile

I'm assuming English is a second language for you, which may be why you have trouble asking for help. The first thing I would do is to design a structure to hold the information for one student. Since there needs to be a linked list that structure will have to …

Member Avatar for Ancient Dragon
-1
508
Member Avatar for spookyfish

Sorting becomes a lot easier if you use a structure to hold each person's information instead of individual arrays. Something like this: [code] struct person { char name[MAX+1]; vector<float> sales; } [/code] Note that [b]amount[/b] needs to be either an int or float, but never char. Assumes you are allowed …

Member Avatar for Ancient Dragon
0
124

The End.