15,300 Posted Topics

Member Avatar for Iam3R

>>is it a standard one? Yes -- all compilers are required to implement it like that. [URL="http://en.wikipedia.org/wiki/ANSI_C"]Here[/URL] is info about [b]ansi c standards[/b] >>the array name cannot be changed is it the standard or compiler dependent. Standard -- its impossible to change the name of an object once it has …

Member Avatar for Iam3R
0
89
Member Avatar for maverick405

It should exchange the value of the two variable parameters. The two parameters are [URL="http://www.brpreiss.com/books/opus4/html/page593.html"]passed by reference[/URL] so that swap() can change them and the calling function will see the change.

Member Avatar for mrnutty
0
77
Member Avatar for Ryujin89

line 9: string stop, flavor, count = 0 count is a string, so why are you setting it to 0 like it is an integer? I suspect you want this: [icode]int count = 0;[/icode] line 26: >> if (flavor = 'STOP' || 'stop') strings have to be enlosed in double …

Member Avatar for Ryujin89
0
148
Member Avatar for xavier666

1) remove conio.h -- its non'standard and not implemented by very many compilers. Code snippets should not use compiler-specific stuff. 2) delete all those global variables on lines 12 and 13. Just declare them inside the functions that use them. And you will probably have to pass the std* head …

Member Avatar for xavier666
3
210
Member Avatar for dena
Member Avatar for dena
1
725
Member Avatar for ylchen

better off replacing that fprintf() with c++ fstream class so that the compiler won't complain so much.

Member Avatar for Ancient Dragon
0
2K
Member Avatar for Ineedhelpplz

>>The program is supposed to take in a file provided through standard input That means get the name of the file from standard input, not the lines of the file. You have to open the file and read each word, something like this: [code] int main(int argc, char* argv[]) { …

Member Avatar for Ancient Dragon
2
157
Member Avatar for flipjoebanana

You don't have to store all the lines, just the two lines that you want to compare. Sequentially read the file, counting lines as you go along then save only the two lines you want to compare.

Member Avatar for Ancient Dragon
0
105
Member Avatar for hamada_1990

[QUOTE=joshSCH;461509]Aside from your atrocious spelling, and absolute terrible writing ability[/QUOTE] I doubt English is his native language. You try writing in a language you don't know very well and you too will have that exact same problem. DaniWeb does not require people to be English majors or native English speakers. …

Member Avatar for hamada_1990
-2
436
Member Avatar for jk2005.jeeva

Its really a very simple concept ([URL="http://www.newtonlabs.com/ic/ic_6.html#SEC40"]link here[/URL])

Member Avatar for kommuru
0
380
Member Avatar for spekulanta

>>mysql_result[3000][2]=msq_row; If you programmed the rest of that then you should probably know that the above like doesn't work. You should be reading [URL="http://www.zetcode.com/tutorials/mysqlcapitutorial/"]this tutorial[/URL]. (scroll down to the section [b]Retrieving data from the database[/b])

Member Avatar for spekulanta
0
126
Member Avatar for FeVerSeCtioN

Deposit $10,000.00 USD in my paypal account and I'll do it for you. Otherwise you will just have to write the program yourself.

Member Avatar for FeVerSeCtioN
-5
137
Member Avatar for maverick405

Why did you make grades a double instead of an integer? doubles are not necessary in your program because nobody will have a grade of something like 75.123 (at least I never heard of such a thing). First thing is to make a function that takes two arrays as arguments …

Member Avatar for maverick405
0
133
Member Avatar for Dark_Omen

>>i am ne wto ruby on rails,plzz what in the world does that mean :eek: :eek: Looks like half English and half Gibberish.

Member Avatar for pkc
0
426
Member Avatar for wyett

If you use string, then use find() to locate the space, and substr() to extract the characters from position 0 to the location returned by find().

Member Avatar for wyett
1
115
Member Avatar for scriptkiddy

>>The program was initially written in VC++ VC++ is not a computer language. Its an IDE/compiler. So saying you are converting from vc++ to c++ is nonsense.

Member Avatar for Ancient Dragon
0
187
Member Avatar for MooAndStuff

Is a core file produced? Yes, then use dbg on that core file and it will tell you where the crash occurred.

Member Avatar for MooAndStuff
0
1K
Member Avatar for maverick0612

[URL="http://dinosaur.compilertools.net/yacc/index.html"]Yet Another Compiler Compiler (YACC)[/URL]

Member Avatar for Ancient Dragon
0
103
Member Avatar for jmangu

Modern 32-bit compilers to not support that header file because it was intended for 16-bit MS-DOS 6.X and earlier operating systems. The alternative is to use win32 api functions OpenFile() to open a comm port, ReadFile() and WriteFile() to read/write to it. MSDN has a large article about [URL="http://msdn.microsoft.com/en-us/library/ms810467.aspx"]serial communications.[/URL]

Member Avatar for Ancient Dragon
1
3K
Member Avatar for Dani

Happy Birthday Dani. I'm having an extra shot of Irish Mist for you. :)

Member Avatar for AndreRet
1
430
Member Avatar for kennyted
Member Avatar for ubi_ct83

That seed_array is declared wrong -- you need a 2d array of characters. such as [icode]char seed_array[20][200];[/icode] Instead of using strchr() it might be easier to use brute-force method

Member Avatar for Ancient Dragon
0
87
Member Avatar for cakka

Use [URL="http://www.bandwidthplace.com/"]this bandwidth test[/URL]

Member Avatar for zortec
0
332
Member Avatar for restrictment

Very nice game -- enjoyed playing it. I have two problems [list=1] [*] On the menu "What would you like to do?", it has 8 menu items. Your program needs to validate that I enter a number 1 to 8. [*] There is no way to quit the game, except …

Member Avatar for restrictment
1
360
Member Avatar for play_c

Its not working because thread functions must be either static alss members or functions outside any class. Address of a non-static class method can not be passed to any win32 api function. Make StartThread() static and the compiler will probably take it.

Member Avatar for play_c
0
3K
Member Avatar for scriptkiddy

Can not be done because MFC will not give you what much control over it. All the text in the edit control is displayed in the same color. You can't use html in any mfc control.

Member Avatar for scriptkiddy
0
251
Member Avatar for CRD

>>_CRTIMP FILE* __cdecl fopen (const char*, const char*); The above is a function prototype. It has an open parentheses '(' and close parentheses ')' with or without arguments between the parentheses.

Member Avatar for Ancient Dragon
0
265
Member Avatar for Nixriq

>> int numbers[ARRAY_SIZE]; {10,20,30,40,50,60,70,80,90,100} That is incorrect. Here is what you want[icode] int numbers[ARRAY_SIZE] = {10,20,30,40,50,60,70,80,90,100};[/icode] The index number is nothing more than the loop counter. Therefore you can delete the line [icode]for( index=0;index<20;index++) [/icode] then cout the value of count instead of index.

Member Avatar for Ancient Dragon
0
106
Member Avatar for Jupiter 2

[QUOTE=Jupiter 2;1044027] Do you think I should quit Daniweb? I'm sure Bob would agree.[/QUOTE] No -- just ignore him and maybe he will go away. Report harassing posts and he will probably get an infraction.

Member Avatar for ~s.o.s~
-4
998
Member Avatar for dgr231
Member Avatar for dgr231
0
244
Member Avatar for StaticX

>>it does not work! What does that mean??? Are you getting compile errors? Yes, then post the errors and the code that caused the errors.

Member Avatar for Ancient Dragon
0
90
Member Avatar for mrinallabs

google for "ODBC tutorials". You will be expected to already have a good grasp on C/C++ language. There are other ways to do it, but ODBC is the most common.

Member Avatar for Ancient Dragon
0
25
Member Avatar for george_82

you can not use inport and outpout with any 32-bit or 64-bit compiler. Those functions are no longer supported by the operating system. On MS-Windows you will have to use win32 api functions, starting with OpenFile() to open the com port, ReadFile() to read from it, and WriteFile() to write …

Member Avatar for Ancient Dragon
0
170
Member Avatar for julie_kaz

julian dates is just a count of the number of days from 1 January to the current day of year. And that's all toJulian() is doing.

Member Avatar for Ancient Dragon
1
2K
Member Avatar for lacompsr

>>Can we do this using winsock hooks. Probably not. You can hook into a browser itself, but not web pages. I suppose you could find out where a browser gets the web page from the internet and then rewrite the page.

Member Avatar for Ancient Dragon
0
67
Member Avatar for dominion
Member Avatar for squigworm

>>As far as I know, the fastest way to initialize an array is to do so using a for loop... For simple data types (char, int, etc) the fastest way to initialize an array to all 0s is to use memset(). If you want to initialize it to some other …

Member Avatar for mrnutty
0
243
Member Avatar for aman rathi

More info about pointers ([URL="http://daweidesigns.netfirms.com/cgi-bin/pointers.php"]link here[/URL])-- from DaWei on PFO.

Member Avatar for jbennet
2
118
Member Avatar for skalber

Its possible that GetOpenFileName() is sucking up your message. Call [URL="http://msdn.microsoft.com/en-us/library/ms644947%28VS.85%29.aspx"]RegisterWindowMessage[/URL]() to obtain a unique message for inter-application/thread communication. I don't know if that will resolve your problem, but worth a try.

Member Avatar for skalber
0
94
Member Avatar for GagandeepKaur
Member Avatar for AdRock

you want to use the substr() method, not erase(). And delete line 8 because length isn't needed (unless you want to use it somewhere else). [code] string type = temp.substr(0, pos); string value = temp.substr(pos+1); [/code]

Member Avatar for Ancient Dragon
0
94
Member Avatar for varun_p_n

First you have to get a list of all the files in the folder ( see FindFirst() and FindNext() win32 api functions). Then for each of those call _stat() to get the file creation date and compare that with today's date. Finally, use remove() to delete the file. Where should …

Member Avatar for Ancient Dragon
0
397
Member Avatar for racumin

C/C++ use "libraries", and "dll"s (MS-Windows) not packages. How to create one depends on the compiler you are using. Normally the source code for a library is all in one folder, and it doesn't matter what the folder name is as long as your compiler knows.

Member Avatar for Ancient Dragon
0
95
Member Avatar for danibootstrap

You need to look for WM_KEYUP and WM_KEYDOWN events. [URL="http://cboard.cprogramming.com/windows-programming/53284-wm_keydown-vk_escape.html"]Here [/URL]is an example thread.

Member Avatar for Ancient Dragon
0
103
Member Avatar for redroze
Member Avatar for kommuru
0
74
Member Avatar for joshSCH

[QUOTE=twomers;807227]Hey Josh. Yeh back again?[/QUOTE] Not for long -- he's been banned again too :) :) :) And this time probably permanently.

Member Avatar for jbennet
-3
486
Member Avatar for danibootstrap
Member Avatar for Ancient Dragon
0
328
Member Avatar for BluRayHiDef

1. Just read the fields one at a time into an instance of the Song class, then add the Song class to the vector [code] vector<Song> theList; Song s; infile >> s.title >> s.artist >> (etc etc for each field) theList.push_back(s); [/code] 2. You can use an iterator for this …

Member Avatar for Ancient Dragon
1
95
Member Avatar for RobBrown

line 77: why don't you just same the characters in a std::string object so that you can easily write it to a file?? function counter() -- its too lengthy and too complicated. The following will work if ch is always an alphabetical letter 'A'-'Z' or 'a'-'z'. [code] void counter(char ch) …

Member Avatar for Ancient Dragon
1
122
Member Avatar for Deadmon

sizeof( any pointer ) is always the same -- sizeof returns the number of bytes it takes to store the address of the pointer, not the length of the string the pointer references. So lines 12 and 13 of your code will always return the same value (probably 4). line …

Member Avatar for Ancient Dragon
0
165

The End.