15,300 Posted Topics

Member Avatar for ok555

dllexport and dllimport are only used in DLLs. You don't use those keywords to refer to functions that are contained in other source files that are linked with the project. in main.c you need to prototype the function that is included in a different *.c file using [b]extern[/b] keyword. Below …

Member Avatar for Ancient Dragon
0
733
Member Avatar for hamidr

you failed to prototype function myf() before it was used, so the compiler make an incorrect assumption that it returned an int. Add the function prototype [b]double myf(double x);[/b] before function main but after the includes. And thank you for using code tags to make your code easy to read.:)

Member Avatar for Ancient Dragon
1
74
Member Avatar for Juggler

please post code so we don't have to guess what you are doing. But basically its like this [code] char string[] = "Hello World"; int len = strlen(string)-1; while(len >= 0) printf("%c",string[len--]); [/code]

Member Avatar for Juggler
0
225
Member Avatar for Mushy-pea

>>C and C++ should be abandoned you don't have to use C/C++ if you don't want to, but don't expect everybody else to do so. Writing windows GUI programs is just a small part of the software design/programming efforts. And in some operating systems C and assembly language are the …

Member Avatar for Rashakil Fol
0
87
Member Avatar for ramyasree

don't know why you would want to do that it will just make your program more difficult, but you could create arrays of each object now is the structure. Lets say you need arrays of 255 items. [code] pid_t pid[255]; int length[255]; char buff[255][128]; [/code]

Member Avatar for WaltP
0
186
Member Avatar for spacecowboy123

you need to add the parentheses so that the compiler will know it is calling a function. [code] randomno = randgen[color=red]()[/color]; // Generate random number [/code] >>it has a variable double register random do you mean you declared it like this ??: [code] register double random; [/code] All of the …

Member Avatar for spacecowboy123
0
2K
Member Avatar for Dextral

since this is a normal windows program you could replace sleep with a timer (see SetTimer() in MSDN) that is triggered every xxx milliseconds, and move call to refreshAutoAway() inside the timer event handler. Then replace that loop with the message pump, calling PeekMessage(), which will block your program until …

Member Avatar for Ancient Dragon
0
93
Member Avatar for rxgmoral

what was the error? please copy from window and paste to your post. Since you are subclassing a standard MFC control your dll should be an "MFC Extension DLL". I have never successfully exported that type of class from a regular DLL. Also, I suspect you did not import the …

Member Avatar for Ancient Dragon
0
184
Member Avatar for peter_budo

[QUOTE=peter_budo;266282]I think everybody hate when his phone/mobile ring, you pick up and hear that you just won some kind of Grand Price. [/QUOTE] That really makes be glad I do not own a cell phone:mrgreen: I get enough commercials from TV, radio and spam e-mail. I don't have to put …

Member Avatar for Ancient Dragon
0
93
Member Avatar for moderate_rock48
Member Avatar for Ancient Dragon
0
139
Member Avatar for clemente

why are you responding to a year-old thread??:eek: :eek: I doubt the OP is interested in it any more.

Member Avatar for ~s.o.s~
0
101
Member Avatar for matrimforever

There is lots of on-line help for the pow function -- such as [URL="http://www.die.net/doc/linux/man/man3/pow.3.html"]this[/URL] one. [code] while (theFile >> number) { cout << number << "\n"; } [/code] that will read every number in the file, assuming the file contains no other strings. The program will store evey number read …

Member Avatar for matrimforever
0
168
Member Avatar for missg82

I hate to say this, but you can start by reading your textbook and paying attention in class. We have no idea what you are supposed to do either because you did not mention what computer language, operating system and/or compiler you are studying. Once you have figured that out …

Member Avatar for ~s.o.s~
0
97
Member Avatar for mjlead
Re: Vb

what version of MS-Windows is your computer running? I assum you are tring to install VB .NET 2005 (Express edition?) Go back to the Microsoft download page and read about system requirements -- make sure your computer meets or exceeds those requirements.

Member Avatar for Ancient Dragon
0
81
Member Avatar for simmyhp

>>1. I don't know why when I enter the number in, when it prints out the number which function has that problem? >>2. I don't know whether my checking part can really check the numbers have repeated or not Why not make that check at the time a number is …

Member Avatar for WaltP
1
103
Member Avatar for chubbywubba

If you expect an answer you will have to post some code and show your attempts to solve the problem.

Member Avatar for Ancient Dragon
0
108
Member Avatar for rxgmoral

A couple observatons: 1. variable font needs to be a member of a class and not allocated on the stack so that it will not get auto destroyed when the function returns. 2. You probably need to typecase it [code] GetDlgItem(IDC_FONTID)->SetFont(reinterpret_cast<CFont*>(&font)); [/code]

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

I see we can get it as a screen saver too! Looks like it would be worth the $50.00 or so.

Member Avatar for John A
1
71
Member Avatar for paradoxxx

there are 255 characters in the ascii character set (only about half are printable), so all you have to do is create an int array of 255 and use the char as an index into that array. When all done, loop through the array and print out the values for …

Member Avatar for Ancient Dragon
0
114
Member Avatar for e21_kam

I would input everything info one big string then parse the string to find out how many words where are. If it contains the correct number of words then it can be broken into its individual parts.

Member Avatar for e21_kam
0
201
Member Avatar for kimw

You cannot write directly to an *.xls file and expect Excel to read it because *.xls files are not plain text files -- they contain a lot of formatting information that is readable only by Excel program. The easiest way to do it is to creates *.csv files which Excel …

Member Avatar for Salem
0
136
Member Avatar for tomtat

>> char tmp[10]; tmp is too small -- increase to at least 20. Lets say I enter a string of 18 characters, the line tmp[len] = '\0'; will cause program crash. [edit]Other than the above problem your program seems to work ok. I didn't check every line of the output, …

Member Avatar for ~s.o.s~
0
100
Member Avatar for neeven

This has got to be the worst job of posting I have ever seen anywhere on the web! If you won't make the effort to post something readable then nobody is going to make the effort to respond to your question. If you don't know how to use code tags …

Member Avatar for indianscorpion2
0
254
Member Avatar for pitopito

Another option you might consider is standard ODBC which will make your program more portable to other compilers should you ever decide to change compilers. There are a number of free c++ ODBC class you can download off the net.

Member Avatar for Ancient Dragon
0
111
Member Avatar for FireSBurnsmuP

there are two formas of function getline -- one for c-style character arrays and the other for std::string objects. You are trying to use the incorrect one. Here's what you need: [code] getline(cin,playerOne); [/code]

Member Avatar for WolfPack
0
153
Member Avatar for Barefootsanders

post one of the rows so we can see what kind of items it has. Generally, if they are all strings (or words). Assuming the name of the stream is [b]in[/b] [code] std::string word; while( in >> word ) { // blabla } [/code]

Member Avatar for Barefootsanders
0
74
Member Avatar for The Dude
Member Avatar for aznballerlee

>> f the parameter dance is translatable, the function sets instructions to the translation of the dance, I have no idea what that is supposed to mean. You should have been given clarification in class or in your textbook. Well, I see from google that it is some sort of …

Member Avatar for Ancient Dragon
0
71
Member Avatar for madankumar

>>We cannot have static friend function............ who told you that mis-information???? Is below the sort of thing you are talking about? My compilers do not have a problem with [b]static friend[/b]. And if you google for "static friend functions" you will find more info about it, such as [URL="http://www.thescripts.com/forum/thread539425.html"]this[/URL] thread. …

Member Avatar for ~s.o.s~
0
1K
Member Avatar for tirivamwe

post the declaration of variable [b]word[/b]. It should be [code] char word[some_value]; or char *word; [/code]

Member Avatar for tirivamwe
0
588
Member Avatar for The Dude
Member Avatar for The Dude
0
81
Member Avatar for Lun

please edit your post to use code tags per[URL="http://www.daniweb.com/techtalkforums/announcement8-3.html"] these[/URL] instructions. And please post a few of the errors.

Member Avatar for Lun
0
148
Member Avatar for GarveyDesign

look at the menu options -- there is probably an option to compile for release or debug. You arle probably compiling for relase, which does not contain the information needed for you to single-step through the program.

Member Avatar for GarveyDesign
0
99
Member Avatar for ashish_cool_231
Member Avatar for Ancient Dragon
0
112
Member Avatar for Ancient Dragon

I have read several (numerous really) threads but none of them help me. My computer has two huge hard drives. I have Windows XP on the master drive and I want to install fedora 5 on the slave. During the fedora installation there is a window that says grub will …

Member Avatar for Ancient Dragon
0
155
Member Avatar for Mr.UNOwen

>>so let me know if it's even doable Absolutely and most definitely YES. We do it all the time. just pass the name of the array. Here is a simple example. [code] void foo(int array[]) { // blabla } int main() { int array[10]; foo(array); return 0; } [/code]

Member Avatar for TylerSBreton
0
120
Member Avatar for AnG'

Here is a starter. I would create a structure for the two strings, then array of that structure. [code] #include <iostream> using namespace std; struct states { char *stname; char *stabbr; }; states st[] = { /* State abbreviation*/ "North Carolina", "NC", "South Carolina", "SC", "Georgia", "GA", "Florida", "Fl", "Alabama", …

Member Avatar for AnG'
0
127
Member Avatar for kraid

[URL=http://vetusware.com/download/TASM%205.0/?id=65]TASM 5.0[/URL] is a MS-DOS 6.X and earlier 16-bit assembler and will not assemble 32-bit code that is needed for MS-Windows.

Member Avatar for condor666
0
235
Member Avatar for balgarath

I'm not supprised -- it is probably stack overflow problem with all those recursive calls and putting all those huge arrays on the stack. Try putting that array in global memory, outside any function and maybe use a non-recursive algorithm.

Member Avatar for Ancient Dragon
0
547
Member Avatar for khem Nath

a) I suspect you are attempting to use 16-bit borland graphics functions with a 32-bit compiler? If not then I have no idea what you mean. You will have to post actual error message(s) b) a pointer is just the address to the beginning of an array. Of course there …

Member Avatar for Ancient Dragon
0
72
Member Avatar for adnanabro

Welcome -- we are happy to help all programmers regardless of your major in college. All you have to do is ask a lot of questions and post code that show problems.

Member Avatar for happygeek
0
35
Member Avatar for gip_mad

If you are talking about true MS-DOS than it is not possible because MS-DOS is not a multi-tasking operating system. When your program runs there will be no other programs running on the computer. If your computer is running any version of MS-Windows then you will not be running MS-DOS, …

Member Avatar for Ancient Dragon
0
107
Member Avatar for boule

see sizeof() operator -- but the size of a pointer is always the same on 32-bit compilers.

Member Avatar for Salem
0
162
Member Avatar for joyce_16jo

>>hey,, i'm joyce, newbie Welcome to DeniWeb. Please go to the CoffeeHouse and tell us about yourself. As for your problem if it were me I would convert the integer to a character string then just print the string backwards. You can use sprintf() to make the conversion.

Member Avatar for Salem
0
98
Member Avatar for gutsylow

[QUOTE=xyfay;261865]God will bless you~gustylow. You will get the best present- a lovely baby and what do you think about your baby's name?[/QUOTE] Yes, you will have to let us all know when the happy event occurs:) As for a name -- hummm -- maybe DaniWeb :mrgreen: And welcome to the …

Member Avatar for happygeek
0
64
Member Avatar for mitchelltab

I compiled and ran it with Dev-C++ and it seemed to work ok. The only change I had to make was to flush the input stream after selecting a menu. You should not use scanf() especially with strings because it will allow you to type more characters than the input …

Member Avatar for Lucanio
0
133
Member Avatar for Mangai

I get similar error sometimes if I did not include the correct header files and something has not been defined. DaniWeb does not allow us to use our crystle balls to see your program so I you will just have to post it.

Member Avatar for Mangai
0
221
Member Avatar for The Dude

I guess I'm fortunant because I'm 63 and still have a full-time well-paying job. I have to wait until I'm 66 before I can collect full SS and I've thought about what to do if I do lose my job before then. Well, now I know.:mrgreen:

Member Avatar for WolfPack
0
113
Member Avatar for venomlash

ios646.h is apparently available in the C99 C standards. But I don't know how many compilers have implement those new C standards yet.

Member Avatar for vegaseat
0
202
Member Avatar for andriss

first learn to open a file using fopen(), read a line from the input file using fgets() and write the same line to the output file using fprintf(). Once you can do that, come back and talk about how to actually split the file into two or more files.

Member Avatar for Ancient Dragon
0
100

The End.