15,300 Posted Topics

Member Avatar for ithelp
Member Avatar for zoner7

>>fatal error C1083: Cannot open include file: 'close_code.h': No such file or directory It means exactuly what it says it means. The compiler can't find close_code.h ?

Member Avatar for thriek
0
270
Member Avatar for nats01282

>>player1score = add10 (player1score); The first example doesn't work because it never changes the value of player1score variable. In the above code, when add10() returns it assigns the return value to player1score. That is not done in the first example. Passing a variable by reference does not do anything if …

Member Avatar for nats01282
0
94
Member Avatar for ilyaz

The program [b]depends.exe[/b] distributed with the compiler will tell you all the DLLs that are required by your program. Probably one or more of them are missing or the wrong version.

Member Avatar for ilyaz
0
109
Member Avatar for elexender

You can not call malloc() to allocate c++ classes. It doesn't work. Use the c++ [b]new[/b] operator. You have to call either [b]delete[/b] or [b]delete[][/b] to destroy it.

Member Avatar for elexender
0
219
Member Avatar for Xufyan

>>float main(void) main() does NOT return float -- only returns int [code] float abc(float *x) { float p; scanf ("%f",x); p=*x* *x; return(p); } int main() { float a,b; a = abc(&b); printf("a = %f\nb(x) = %f\n", a, b); } [/code]

Member Avatar for Xufyan
0
110
Member Avatar for bletchley

It's probably time for you to invest some $$$ and buy a good c++ book that covers a lot more than just the basics. Just because it will contain a chapter or two on data types, loops, etc doesn't mean you have to actually read them. Just skim over the …

Member Avatar for Ancient Dragon
0
100
Member Avatar for Galois77

Memory allocated in a DLL must be released in the same DLL. Memory allocated in the main *.exe program must be released in the main application program. You cannot allocate memory in the DLL and release it (delete or delete[] or free() ) it in the main application program. So …

Member Avatar for Ancient Dragon
0
325
Member Avatar for Darizuka

If the files are small enough why not just copy to 5 1/4" floppy diskette? Then copy then onto the XP file system. You might also be able to create a LAN and copy them directly.

Member Avatar for jephthah
0
302
Member Avatar for dls_20022002

[code] char answer; cout << "Enter Y or N\n"; cin >> answer; cin.ignore(); // ignore '\n' answer = tupper(answer); // convert to upper case if( answer == 'Y') { // blabla } [/code]

Member Avatar for Ancient Dragon
0
64
Member Avatar for wanst666

what compiler are you using and on what operating system? Suggest you google for that error message and you might find the problem.

Member Avatar for Ancient Dragon
0
54
Member Avatar for bobby101

>>strftime(date,3,"%W",&tim); Why? the tm structure already contains the weekday in numeric form. Just use it.

Member Avatar for Ancient Dragon
0
84
Member Avatar for lavendon89

Check the result of scanf(). Maybe the last line of the file is a blank line.

Member Avatar for WaltP
0
99
Member Avatar for prade

[URL="http://tldp.org/HOWTO/NCURSES-Programming-HOWTO/"]Read this [/URL]to research your question. There are a few links to games at the bottom of that link you might want to read. I have not read them so I don't know what they contain.

Member Avatar for jephthah
0
163
Member Avatar for vathsala1

Most likely your program is losing data because it does not have an interrupt driven input driver. If you used win32 api functions you would not have that problem. See [URL="http://msdn.microsoft.com/en-us/library/ms810467.aspx"]this article[/URL]

Member Avatar for jephthah
0
244
Member Avatar for b.bob

Note that the terms "IN", "OUT", and "INOUT" are just a description of what the parameters are used for. Only for human consumption and mean absolutely nothing to the actual program or function. When you learned C or C++ language you did not use those terms, but you did learn …

Member Avatar for Ancient Dragon
0
4K
Member Avatar for vamsi51

Don't understand the question. The code snippet you posted looks perfectly ok to me (other than the obvious that its not in a function and missing the last } character) Did you bother to compile and run the program to see what it produces? If not then you should do …

Member Avatar for Ancient Dragon
0
91
Member Avatar for rumala13

You have stated your assignment (probably homework) but you didn't state your question(s).

Member Avatar for Ancient Dragon
-1
110
Member Avatar for Robert1995

The way I understand the problem, the array does not have to have 10000 elements -- 10000 is just the maximum value that any one element may contain. In otherwords you have to generate an array that contains N elements (allocate with [b]new[/b] operator), the value of each element is …

Member Avatar for Robert1995
0
129
Member Avatar for vbx_wx

Could be one (or both) of two problems: 1) The destination can not be just the path, but the path + filename. The destination filename may be the same as the source filename or something else if you want to rename it. 2) You may not have permissions to write …

Member Avatar for vbx_wx
0
116
Member Avatar for xclusv-aj

cruise.h is something you made up, so you'll have to post it if you expect any help.

Member Avatar for Ancient Dragon
0
87
Member Avatar for virgin199

No one here is going to write your program for you. You should have started on that at least a week ago if it's due tomorrow. So much for your procrastination. The assignment seems pretty clear to me. Do you know how to create a class? No, then study your …

Member Avatar for jephthah
-2
670
Member Avatar for bucwet

line 14: That declares an array of MAXSTRLEN number of pointers. Its not a character array. Remove the *. line 21: There is no need for the typecast. line 22: There is no need to increment both variables [b]i[/b] and [b]count[/b] because they both have the same value. line 24: …

Member Avatar for bucwet
0
237
Member Avatar for Lukezzz

Here is how I did it in MFC (have not used managed CLR but it might be the same). In Form2 create a public variable that holds whatever you want to pass it, then in Form1, just after gcnew line, set the value of the variable. Once Form2 starts it …

Member Avatar for Lukezzz
0
265
Member Avatar for johndoe444

The size of data types is mostly compiler dependent. See limits.h for sizes and maximum values. >>Was short type ever was 1 byte and changed to 2 bytes later on? Not that I know of, but could have been depending on the compiler. >>How to specify long long int and …

Member Avatar for Ancient Dragon
0
204
Member Avatar for prade

probably because you didn't include code to keep the window open [code] printf("Hello World\n"); getchar(); // wait for you to press the Enter key [/code]

Member Avatar for Ancient Dragon
0
171
Member Avatar for sejalpastagia

Hint: The return value to a is undefined because the function doesn't explicitly return a value. Also, most modern compilers will produce errors on that code.

Member Avatar for Ancient Dragon
-1
106
Member Avatar for 42Wired

Not likely to keep the path or filename because it is only needed to pass along to the operating system so that it can open the file and return the handle to fstream. You could subclass fstream so that it saves that information.

Member Avatar for 42Wired
0
329
Member Avatar for miskeen
Member Avatar for vegaseat

I would think it would be better to implement the queue as a linked list so that it can contain an (nearly) infinite number of items in the queue.

Member Avatar for mitrmkar
2
233
Member Avatar for mani_singh

>>*(float*) variable = 34; It is typcasting [b]variable[/b] into a float *, then assigning the value 34 to it. DWORD* is doing something similar to above. DWORD is defined by Microsoft's windows.h to be [b]unsigned long;[/b]. So its the same as (unsigned long *) I've studied MFC a lot and …

Member Avatar for nezachem
0
264
Member Avatar for artikapri

No. But there is a win32 api function that is called. VS 2005 is nothing more than a compiler and IDE. I think something in [URL="http://msdn.microsoft.com/en-us/library/ms645533%28VS.85%29.aspx"]this link[/URL] will help you

Member Avatar for Ancient Dragon
0
45
Member Avatar for spdbump08

Look at those two lines and see if you can't figure out what is wrong with them. Read the error messages carefully because they tell you exactly what is wrong.

Member Avatar for Ancient Dragon
0
128
Member Avatar for soapyillusion

[code] struct item { string name; float price; }; int main() { item it[] = { {"Fried Chicken",12.99F}, {"Pork Chops", 10.99F}, {"Soda", 2.99F} }; for(int i = 0; i < sizeof(it)/sizeof(it[0]); i++) { cout << setw(20) << left << it[i].name << setw(5) << right << it[i].price << '\n'; } } …

Member Avatar for Ancient Dragon
0
92
Member Avatar for vbx_wx

Under MS-Windows the only way is to call CreateProcess() to launch the console program. One of that function's parameters will tell it to create the process without a console.

Member Avatar for Ancient Dragon
0
37
Member Avatar for Priyanka88

>>hv no time to read dat help topics.. Then go watch TV of play some video games. The same site you download the compiler has a tutorial. Go read it and stop being so childish.

Member Avatar for Priyanka88
0
174
Member Avatar for krishna.sv

>>please check this script Why? Check it yourself by compiling and running it. We are not your compiler.

Member Avatar for martin314
-1
116
Member Avatar for vbx_wx

You want to use win32 api [URL="http://forums.devshed.com/c-programming-42/c-help-with-enumwindows-getwindowtext-needed-please-332249.html"]EnumWindows[/URL]

Member Avatar for Ancient Dragon
0
146
Member Avatar for elektro123

you don't have to convert anything -- just write the array to a file as it is. BTY: you can not write bits to a file -- only bytes.

Member Avatar for elektro123
0
231
Member Avatar for Dream2code
Member Avatar for Begginnerdev

Your error check is not going to work. Why? Because if someone enters more than 16 characters then the entire program will get trashed and there is nothing that you can do to avoid it. That's one of the problems with scanf(). What I would do is get the string …

Member Avatar for Ancient Dragon
0
108
Member Avatar for jgehlot09

you can use '\r\ to move the cursor back to the beginning of the current line so that you can print some other text, e.g. [icode]printf("\rHello");[/icode]

Member Avatar for Ancient Dragon
0
66
Member Avatar for SCMAN2010
Member Avatar for pinsickle

>>void writeIteratively (ostream& outfile) That function does not have a [b]this[/b] pointer because its not a member of a c++ class. Maybe you meant [icode]void BinarySearchTree::writeIteratively(...);[/icode]

Member Avatar for pinsickle
0
92
Member Avatar for TSaunders84

When the elements of the array are moved (or copied) up a slot that will overwrite whatever was there before. That does not make the arrray smaller, it just means the last array element is left empty, or unused.

Member Avatar for WaltP
0
78
Member Avatar for i_luv_c++

You are asking about how to flush and discard the input stream of all its contents. Narue wrote [URL="http://www.daniweb.com/forums/thread90228.html"]this thread [/URL]some time ago that explains how to do that.

Member Avatar for i_luv_c++
0
115
Member Avatar for hlmjohnson1981

>> string tscore[26]={}; You don't need to create an array of std::string objects. Just one will do, such as [icode]std::string tscore;[/icode] This code will give you one string with embedded '*' s. Note that you will have to add code that prevents the last '*' from being in the string. …

Member Avatar for Ancient Dragon
0
84
Member Avatar for zango

Look at line 30 of the code snippet you posted. See -- it has one parameter. Now look at line 23 ... there is no parameter. That's what the compiler is complaining about. You need to pass by reference the object you want to subtract. You need to create another …

Member Avatar for Ancient Dragon
0
114
Member Avatar for robski

There is no standard C or C++ way to do that. There are a couple non-standards methods, depending on the operating system. For MS-Windows compilers you might look to see if your compiler supports conio.h. It has functions such as kbhit() that checks to see if something is available at …

Member Avatar for Ancient Dragon
0
108
Member Avatar for hurricane123

[code] char value1[10]="new york"; char value2[9]="st louis"; char result; v1=&value1[0]; v2=&value2[0]; [/code] All those lines are in the wrong function. Mystrcmp() needs to compare the two strings that are the parameters to the function. [code] int main() { char value1[]="new york"; char value2[]="st louis"; int x = Mystrcmp( value1, value2 …

Member Avatar for WaltP
0
124

The End.