3,892 Posted Topics

Member Avatar for mattyd

Knock knock... do I see somthing missing... #include <cstdlib> #include <iostream> #include "Look.h" using namespace std; int currPos = 0; int checkFlag = 0; static int shipPos1 = 0; // default start position (pos 0) int shipPos2 = 228; // 3.80 minutes (228 seconds) Look::Look() { } Look::~Look() { } …

Member Avatar for mattyd
0
148
Member Avatar for n.aggel

Okay to put it in a simple way, the round bracket syntax is used when you want to initialise the primitive data type varibles in your class with their defalut value while you ignore the brackets you just get an uninitialized object. [code=cpp] class My { public: int a ; …

Member Avatar for ~s.o.s~
0
201
Member Avatar for balekic

Please be a bit more specific, since this is nor pure C++ but SDL mixed along with it, and also due to the lengthy code it becomes difficult for us to pin point the problem. What exactly happens, does the ball go through the bricks, what do you mean by …

Member Avatar for ~s.o.s~
0
135
Member Avatar for jetyan

[quote=happygeek;272812]An introduction to what, or whom for that matter?[/quote] He wants to know about you :mrgreen:

Member Avatar for happygeek
0
39
Member Avatar for beatle555

Tsk tsk... nowadays everyone wants to be a shaman, resurrecting dead threads...... Thread closed.

Member Avatar for ~s.o.s~
1
254
Member Avatar for n.aggel

Deleting dynamically allocated array is done in C++ using the special delete syntax : [inlinecode]delete[] array_persons ;[/inlinecode] where you had allocated the array with something like: [inlinecode]int* array_persons = new int[10] ;[/inlinecode] An eg. [code=cpp] int main() { int* a = new int[10] ; for( int i = 0; i …

Member Avatar for ~s.o.s~
0
94
Member Avatar for Bobbiegirl

1. First of all main returns int so your prototype should be [inlinecode] int main (void)[/inlinecode] with a [inlinecode]return 0[/inlinecode] at the end of the program. 2. You wanted a square of * but you ask the user two parameters width and height , so do you really want a …

Member Avatar for ~s.o.s~
0
143
Member Avatar for Roberdin

Firefox for me. (with all the extensions available on the net, I can make a godly browser out of it)

Member Avatar for BeastOverlordH6
0
545
Member Avatar for nanodano

Hmm.. if you want to code this thign from scratch, you need to use some socket library. (like winsock for windows) Maybe looking at this thread would help a bit: [url]http://www.daniweb.com/techtalkforums/thread50205.html[/url] Hope it helped, bye.

Member Avatar for ~s.o.s~
0
99
Member Avatar for happygeek

Done and done. Also posted a touchy comment which would make their eyes water *sniff sniff* Hehe. Glad I could help.

Member Avatar for happygeek
0
133
Member Avatar for aznballerlee

Hmm... what happens if the capacity of array overflows ? You state in your problem statement that the function returns -1 if the inserted element causes the array to have more than max elements , but still in your eg. you return 1 ? Post two or three egs. specifying …

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

[quote=Chaky;272646]I guess it's the story of my life. Always at the end of the line.[/quote] Just wanted to quote two things: [quote]With great powers comes great responsibility[/quote] [quote]The grass is always greener on the other side[/quote] Regards, ~s.o.s~

Member Avatar for Dani
0
96
Member Avatar for boujibabe

Hmm.. a palindrome actually doesnt consider spaces, punctuation marks and character case (upper or lower). Maybe for a more detailed explanation, you might want to look here: [url]http://www.daniweb.com/techtalkforums/thread59789.html[/url]

Member Avatar for ~s.o.s~
0
460
Member Avatar for mattyd

Wow that sure is some dream. BTW do you really have a girlfriend or even that was a part of your dream :D

Member Avatar for mattyd
0
76
Member Avatar for tayspen
Member Avatar for mattyd

Maybe you should read this. [url]http://www-ccs.ucsd.edu/c/time.html#clock[/url] As far as the measuring of time is concerned, you can start the timer or measure the value of the clock at the start of the event and then query the time again when you want to know how many ticks has elasped. [code] …

Member Avatar for WaltP
0
231
Member Avatar for shappell

In the project settings have you set the path for the header and library files of your SQL library ?

Member Avatar for ~s.o.s~
0
284
Member Avatar for ~s.o.s~

Hello to all geeks out there, i was just wondering which scripting language out there is capable of achieving everything a scripting language is supposed to do. I know there is no such thing as "best" in software development circles but just wanted to know from all the experienced people …

Member Avatar for ~s.o.s~
0
402
Member Avatar for ~s.o.s~

Heh people, finally I have been struck by P1K ... oh I mean I have completed by 1000 posts on Daniweb. Feels good. :mrgreen: With all your members, moderators, super moderators and admins support and friendship, I have in just 5-6 months.. [LIST] [*]reached 1000 posts, [*]5 dot reputation and …

Member Avatar for ~s.o.s~
0
232
Member Avatar for mattyd

My List: Iron Maiden Theory of a Deadman Incubus Papa Roach and lots more but the favourite is :::: IRON MAIDEN !!!

Member Avatar for Chaky
0
33
Member Avatar for linq

[quote=linq;272111] [CODE]string strd1 = "9"; int m=atoi(strd);[/CODE] Got the error: error C2664: 'atoi' : cannot convert parameter 1 from 'class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >' to 'const char *' how to change the second line to make it work?[/quote] [INLINECODE]atoi [/INLINECODE]doesnt accpet a C++ style string but a C style string …

Member Avatar for Salem
0
134
Member Avatar for Dani

Hmm.. hey [B]benobi1[/B] and [B]cosmoe[/B], just to let you know that even though this is geeks lounge, it doesnt mean that you start posting utter crap, irrelevant to the thread which is about Miss Dani's birthday. Either stick to topic otherwise dont post. And let Miss Dani worry about her …

Member Avatar for crunchie
0
792
Member Avatar for boujibabe

You actually wanted num_string as char array( C style string) but have declared it as being char which will hold only one character. [code=c] char num_string = '\0' ; // wrong char num_string[BUFSIZ] = {'\0'} ; // correct, will now hold a number string [/code] Also can you give a …

Member Avatar for boujibabe
0
120
Member Avatar for JRM
Member Avatar for nanodano
0
148
Member Avatar for mattyd

[quote=may4life;271529] [code] void MYFUNCTION(){ } [/code] [/quote] Now I would really like to know who writes functions that way !!!:eek:

Member Avatar for vegaseat
0
323
Member Avatar for Rashakil Fol

C for me, C code can be called from Python, Perl and many other languages. COupled with GUI features of Python and the modules demanding performance in C, try to beat that combo.

Member Avatar for Anonymusius
0
693
Member Avatar for WolfPack
Member Avatar for Dani
0
165
Member Avatar for shoegoe

[quote=iamthwee;271505]Don't forget to use the header #include "very_small_violins" then.[/quote] Oh what the hell, this is the joke of the century :mrgreen: Keep it up Mr. Iamthwee

Member Avatar for ~s.o.s~
0
123
Member Avatar for FireSBurnsmuP

The reason you are not able to find the damn problem is because the way your winner function is designed. A function which spans almost 3 pages in C++ has some serious design problems. Try splitting the function into logical componenets, maybe that would help you localize the problem. Since …

Member Avatar for FireSBurnsmuP
0
160
Member Avatar for Cyclops

Hmm anyone heard of Ragnarok Online. If no then I play that game and if yes then hmm.. (what is the level of your character ;) )

Member Avatar for BeastOverlordH6
0
637
Member Avatar for batista06

[quote=batista06;270974]I'm trying to turn this part into a function into my code[/quote] But where is the function in your code ... I dont see it. Post the updated code.

Member Avatar for Ancient Dragon
0
126
Member Avatar for jimbobint

[quote=niek_e;270739]I agree that this isn't the easiest subject for a beginning programmer, but I'll try to explain: so you can just use 'coordinates' to set and get data! For example if you say: [inlinecode]array[2][2] = 1 ;[/inlinecode] You array will now look like this: 000 010 000 [/quote] Oh so …

Member Avatar for ~s.o.s~
0
160
Member Avatar for noxee

[quote=iamthwee;270884]What's wordstream.h linkedlist.h? Please label which one is which for clarity[/quote] I think he hasn't posted those files.

Member Avatar for noxee
0
128
Member Avatar for The Leprechaun

[quote=easy;266044]run the in a command prompt then ull be able to see all the output before it quits. or try placing [inlinecode]system("PAUSE")[/inlinecode] before the return statement, but i think thats bad practise to do that[/quote] Correct . Its bad practice to use system calls to achieve such a trivial function. …

Member Avatar for may4life
0
85
Member Avatar for 'Stein

Hmm anything for a good friend... Done and done. It would be better if you pasted your request in your signature, that way more ppl will vote for that. PS: BTW who is the girl Lauren ;)

Member Avatar for WolfPack
1
84
Member Avatar for term

Okay the thing is that your code doesnt even compile. I thought maybe you had "some problem" with the code ? The mistakes were all silly ones os i have just changed them and the y are given in red... [code] [COLOR=DarkRed]// #include <iostream.h> depreceated header style use the one[/COLOR] …

Member Avatar for ~s.o.s~
0
89
Member Avatar for jessiegirl

Why dont you declare each and every variable as double, that way you can do away with the cast. Also initialize the var at declaration to avoid confusion and using the values before they are defined.

Member Avatar for jessiegirl
0
106
Member Avatar for pointers

Search engines are your best friends: [URL="http://www.google.co.in/search?hl=en&q=tree+graph+data+structure&btnG=Google+Search&meta="]Google[/URL] [URL="http://clusty.com/search?input-form=clusty-simple&v%3Asources=webplus&query=tree+graph+data+structure"]Clusty[/URL]

Member Avatar for iamthwee
0
121
Member Avatar for phuduz

To get around this problem, try placing the literal value before the variable while comparing. Something like: [code=c] while( true == check ) // here if you make a mistake of using an assignement operator // an error will be flaged[/code]

Member Avatar for may4life
0
82
Member Avatar for mikeallen

Naa you aint defining the default constructor, you are just declaring it in Complex.h but its defination doesnt occur in Complex.cpp, thats the whole root of the problem. Implement one in complex.cpp and all should work out fine.

Member Avatar for mikeallen
0
145
Member Avatar for Scottg1989
Member Avatar for silicon
Member Avatar for mattyd

Hmm... are all the files in the same folder ? Have you checked the project settings of visual studio for this particular project ?

Member Avatar for ~s.o.s~
0
139
Member Avatar for JS1988

Okay lets put it this way: [LIST] [*]You need an output like:[/LIST][QUOTE] 1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 [/QUOTE] [LIST] [*]Notice that the ending number of each line keeps on decrementing each …

Member Avatar for may4life
0
122
Member Avatar for neeven
Member Avatar for Ancient Dragon
0
143
Member Avatar for slash10

Hmm.. i am not sure that i have got your question but: [code] int main( void ) { char name[BUFSIZ] = {'\0'} ; printf ( "Enter the string: " ) ; fgets( name, BUFSIZ, stdin ) ; int i = 0 ; for( i = 0; i < strlen( name …

Member Avatar for neeven
0
177
Member Avatar for mandanainred

[quote=mandanainred;270178] I as it becomes a double , I cant use % with the double. and [/quote] Just to let you know there is a function there is a function [search]fmod(double x,double y)[/search] which exactly does the same thing. But as Mr. WaltP has already pointed out, dont use double …

Member Avatar for ~s.o.s~
0
106
Member Avatar for dummies2

When you say, it doest work, it is very vague. Sifting through someone else's code is really difficult. Since your program is written in modular way, say which parts work properly and which dont.

Member Avatar for ~s.o.s~
0
98
Member Avatar for shingo99
Member Avatar for ~s.o.s~
0
114
Member Avatar for slacke

Try replacing [INLINECODE]#include <asm/io.h>[/INLINECODE] to [INLINECODE]#include <sys/io.h>[/INLINECODE] and tell me what you get.

Member Avatar for slacke
0
205

The End.