3,892 Posted Topics

Member Avatar for DannyMcWilliams
Member Avatar for Mike555
1
60
Member Avatar for Phrogramer

Hello Sophie, welcome to Daniweb. :D Good to see a game phrogrammer here... ;)

Member Avatar for Mike555
0
237
Member Avatar for squinx22

Something like[URL="http://www.cs.plu.edu/%7Edwolff/svn-tutorial/svn-tutorial.html"] this[/URL] ?

Member Avatar for squinx22
0
100
Member Avatar for Brent.tc

You should try out something like [URL="http://www.codeguru.com/forum/showthread.php?t=300530"]this[/URL] though you should know in advance that it would quickly turn out to be ugly in case you don't have the required knowledge of C++/WinAPI.

Member Avatar for ~s.o.s~
0
95
Member Avatar for C++freak

Here is formatted code: [code=cplusplus] #include <iostream> #include<iomanip> #include<string> using namespace std; struct DaysStruct { int month; int st_date; int end_date; DaysStruct(int i,int e) { st_date = i; end_date = e; } } ; struct BaseStruct { int date; int end_date; double snow_depth; } ;//Function prototypes void calcDays(DaysStruct[],BaseStruct[],int); void sortbyBase(BaseStruct[],int); …

Member Avatar for John A
-1
104
Member Avatar for jan1024188

Vista comes with DirectX 10. [quote]There are some issues for software developers using some of the graphics APIs in Vista. Games or programs which are built on Vista's version of [URL="http://en.wikipedia.org/wiki/DirectX"]DirectX[/URL], 10, will not work on prior versions of Windows, as DirectX 10 is not backwards-compatible with DirectX 9.[/quote] Read …

Member Avatar for jan1024188
0
274
Member Avatar for 2mdennis

[URL="http://www.idevelopment.info/data/Programming/java/collections/ArrayListExample.java"]ArrayList example.[/URL]

Member Avatar for 2mdennis
0
162
Member Avatar for FoX_

[quote=FoX_;345208] [code] a = (int **)malloc([COLOR=Red]sizeof(int)[/COLOR] * 10); for(x = 0; x < 10; x ++) { a[x] = (int *)malloc(sizeof(int) * 3); } [/code] [/quote] In this case you were lucky enough to have the size of integer the same as the size of a pointer. If it would …

Member Avatar for FoX_
0
130
Member Avatar for ajay_tabbu

...and do a favour to the members of this forum by posting code in code tags. :D

Member Avatar for ajay_tabbu
-1
154
Member Avatar for cbailey3001

[quote=cbailey3001;345096][code] [COLOR=#800080][/COLOR][COLOR=#800080]public [/COLOR][COLOR=#800080]void[/COLOR][COLOR=#000000] run() { [/COLOR] [COLOR=#800080]for[/COLOR][COLOR=#000000] ([/COLOR][COLOR=#800080]int[/COLOR][COLOR=#000000] i = 1; i >= 1; i++) {[/COLOR] [COLOR=#000000]System.out.println([/COLOR][COLOR=#00ff00]"Thread "[/COLOR][COLOR=#000000] + getName() + i);[/COLOR] [COLOR=#000000]}[/COLOR][/code][/quote] What is the for loop supposed to do? For all I can see, it gets executed only once. Is this what you wanted? Maybe an infinite while …

Member Avatar for deng_cen
0
104
Member Avatar for dmkrivec

Something like this? [code=java] public class Test { public static void main (String[] args) { String str = "HellO THIS is @#@%@ a M*#ED string"; int length = str.length(); int upperCount = 0; int lowerCount = 0; int punctCount = 0; int digitCount = 0; int whiteSpaceCount = 0; char …

Member Avatar for ~s.o.s~
0
138
Member Avatar for sk8ndestroy14

< intends on stealing the plot since even I have the same ranks to climb > ;-)

Member Avatar for ~s.o.s~
0
108
Member Avatar for revenge2

See [URL="http://www.cplusplus.com/doc/tutorial/namespaces.html"]this[/URL] for namespaces. For difference between <iostream> and <iostream.h> see [URL="http://www.devx.com/tips/Tip/14447"]this.[/URL]

Member Avatar for jbennet
0
165
Member Avatar for kpack08

You have an extra semicolon ( ; ) somewhere in your code. Since C++ (and many other languages) treat it as a blank or no processing statement, your compiler is throwing you out that warning. Remove the extra semicolon and you should be fine.

Member Avatar for Salem
0
208
Member Avatar for Rashakil Fol

> why posting games suck Because people evaluating them like the word "suck"....

Member Avatar for Mike555
0
384
Member Avatar for Zuecafajm

Make the member variables of the class as normal variables instead of pointers and you should be good to go. And btw, its not a good idea to make the member variables as private since it voilates the OO practices. Write getters and setters and make your data members as …

Member Avatar for ~s.o.s~
0
93
Member Avatar for kendell

You need to trim the string accepted from the file. Use something like this: [code=cplusplus] #include <iostream.h> #include <string> using namespace std; string trimLeft(const string &value) { string::size_type where = value.find_first_not_of(' '); if (where == string::npos) // string has nothing but space return string(); if (where == 0) // string …

Member Avatar for Lerner
0
95
Member Avatar for The Dude

All these things exist out there, its just that in this particular case, they were exposed to the people. Yes, I sometimes really wonder what the world is coming to...

Member Avatar for Day Brown
0
96
Member Avatar for Dado++
Member Avatar for Day Brown
0
122
Member Avatar for Dani
Member Avatar for John A
0
724
Member Avatar for FreeFull

No such error in my case. Which compiler are you using ? Just a thought, try keeping different variable names for the GOTO labels and your normal variables and see if that makes a difference.

Member Avatar for vijayan121
0
158
Member Avatar for NewKidWalking

If you want IDE's specifically aimed for C++, you can read [URL="http://www.daniweb.com/techtalkforums/post234971-1.html"]this[/URL]. Oh and btw, conio.h is not a standard header, so no point in searching for one.

Member Avatar for ~s.o.s~
0
92
Member Avatar for karan_21584

Another approach would be : [code=sql] delete from TABLE_NAME T where rowid not in (select max(rowid) from TABLE_NAME R where R.common_column = T.common_column;) ; [/code] Here common_column is the criteria for filtering out duplicates.

Member Avatar for davidcairns
0
110
Member Avatar for ahad

Does this occur for specific values of size ? If yes, which compiler are you using ? Also post the relevant code..

Member Avatar for Ancient Dragon
0
126
Member Avatar for peter h
Member Avatar for jbennet
0
25
Member Avatar for Misterarto
Member Avatar for jbennet
0
135
Member Avatar for pyapplico
Member Avatar for jbennet
0
71
Member Avatar for naya22

[URL="http://www.cppreference.com/index.html"]This[/URL] and [URL="http://www.cplusplus.com/reference/"]this.[/URL]

Member Avatar for mariocatch
-1
206
Member Avatar for kjpwa

[URL="http://www.cplusplus.com/reference/clibrary/cstdio/getchar.html"]getchar()[/URL]

Member Avatar for ANUJ SHROTRIYA
0
827
Member Avatar for darrglud

Heh really an interesting thread...From a "beginner asking for advice" to "I will definately take revenge"...Oh, what has this world come to... :D

Member Avatar for John A
0
282
Member Avatar for i m gr8

Your logic is completely broken and your code does not compile on a modern compiler. I can bet you are using Turbo C. The reason your program crashes is because you are trying to write on memory which doesn't belong to you. Output in my case: [QUOTE]this program doesn't work …

Member Avatar for iamthwee
0
484
Member Avatar for wujianwei

[quote=wujianwei;341320]I have been wondering the definition... I mean, Are both 00123 and 12345 five-digit numbers?[/quote] If talking in context of programming languages (C/C++), [B][I]no[/I][/B]. A number with leading 0 denotes an octal number the same way that a leading 0X denotes a hexadecimal number. So in the end, when expressed …

Member Avatar for Aia
0
104
Member Avatar for BaD-AiM

[quote=naya22;341340] [I][B]Remember:[/B][/I] If you give a man a fish you feed him for a day. If you teach a man to fish, you feed him for a lifetime.[/quote] A nobel thought, but please look at the date of the last post before posting. You just resurrected a year old thread... …

Member Avatar for naya22
0
98
Member Avatar for ithelp

That would be silent and notorious [URL="http://en.wikipedia.org/wiki/Buffer_overflow"]buffer overflows[/URL] you are talking about...

Member Avatar for vijayan121
0
114
Member Avatar for addicted

[URL="http://en.wikipedia.org/wiki/Prime_number"]Full defination of prime number.[/URL]

Member Avatar for Lardmeister
0
86
Member Avatar for hbk619

Or use a smart IDE which will interpolate TAB with spaces...That way you can use tabbing in your program and be rest assured that the formatting won't be messed up since that tab would actually be spaces. PS: Long time no see Niek...;)

Member Avatar for iamthwee
1
2K
Member Avatar for emr

[quote=WaltP;340597]It is fine to use floats and doubles as loop indecies.[/quote] Nope, won't do. Try using double and float as your array indices while writing normal programs and you would know the reason. Comparision operators don't cut well with floating point numbes. Read [URL="https://www.securecoding.cert.org/confluence/display/cplusplus/FLP31-C.+Do+not+use+floating+point+variables+as+loop+counters"]this[/URL] and [URL="http://www.cs.princeton.edu/introcs/91float/"]this.[/URL]

Member Avatar for Aia
0
194
Member Avatar for Aia

If creating that function for a standard compiler, you need to adhere to the C/C++ specification. The implementation is upto you. If you want to have a look at some of the implementations see [URL="http://pdcurses.sourceforge.net/"]this[/URL] and [URL="http://www.delorie.com/djgpp/"]this.[/URL]

Member Avatar for vijayan121
0
487
Member Avatar for muadh jamal

[quote=WaltP;340200]Not quite. it's [inlinecode]minimum + (rand() % maximum);[/inlinecode][/quote] Not quite, its: [inlinecode]minimum + (rand() % (maximum - minimum));[/inlinecode] This will produce random numbers in the range minimum inclusive and maximum exclusive. ;)

Member Avatar for WaltP
0
3K
Member Avatar for Daniel E

You must have declared I as an integer variable while size() returns a number of type unsigned integer. Hence the warning message. Try changing the loop variable to type size_t and it should work out to be fine. Read [URL="http://www.cplusplus.com/reference/stl/vector/size.html"]this.[/URL]

Member Avatar for vijayan121
0
119
Member Avatar for RisTar

Keep a counter which will be initialized to 1,[INLINECODE] fgets[/INLINECODE] the entire line of text in a character array, skip the first two lines using the counter previously mentioned and start reading from the third line. Read [URL="http://www.daniweb.com/tutorials/tutorial45806.html"]this[/URL] for using [INLINECODE]fgets.[/INLINECODE]

Member Avatar for RisTar
0
142
Member Avatar for nottoshabi

That is because this program requires the proper use of getchar() or cin.get() so that the junk (newline character) is filtered out of the input stream. Also considering that your return statements are in abundance, it becomes a pain in the neck to make out what it is going on. …

Member Avatar for ~s.o.s~
0
107
Member Avatar for dcc

Congratulations my friend. Hope it feels good to have a star shine by your name... ;)

Member Avatar for ~s.o.s~
0
238
Member Avatar for Lance Wassing

Building something that famous requires a lot of planning and expertise by your side. How many years of developement experience do you have under your belt ? How many people have you by your side ? How far have you reached in this endeavour of yours? Building a database might …

Member Avatar for Infarction
0
203
Member Avatar for satish.paluvai

It must be some problem with your installation or your OS. Try reinstalling it and if it still doesn't seem to satisfy you, switch to a new IDE and compiler.

Member Avatar for ~s.o.s~
0
109
Member Avatar for Dani
Member Avatar for Caped Sam

Linker errors are usually generated when the linker can't find the function definations i.e. the body of the mentioned functions. You need to place the "Serial.h" and "Serial.cpp" file in the same directory as that of the main or driver file and make sure the above mentioned functions are defined …

Member Avatar for satish.paluvai
0
380
Member Avatar for Duki

[inlinecode]initialize( x , y , z ) << endl ;[/inlinecode] You can't do this in C++ esp when initialize doesn't return anything and even if it did, you aren't specifying the stream to which the output should be redirected.

Member Avatar for Duki
0
583
Member Avatar for ntredame

Your program doesn't work becuase you never assign a value to 'ch'. Try adding [inlinecode]ch = input[i];[/inlinecode] inside the for loop. Oh and btw, use of global variables is a bad programming practice, avoid it. Also don't do redundant comparisions. [code=cplusplus] for(int i = 0; i < length; ++i) { …

Member Avatar for ntredame
0
4K
Member Avatar for Matt Tacular

Double quoted literals are used to define strings, while single quoted literals for characters. Since you are creating an array of characters, you need to enclose the O in single and not double quotes like Wolfy has already said.

Member Avatar for WaltP
0
97

The End.