481 Posted Topics

Member Avatar for jimbob90

[code=cplusplus]if (argc=='0'){[/code] Do you realise what you are doing here? argc is a number representing the number of command line arguments passed to your program. '0' is equivelant to 48, so you say if 48 command line arguments are passed then do X. I expect that is now what you …

Member Avatar for Freaky_Chris
0
79
Member Avatar for dr.eu

[CODE=cplusplus]for(counternumbers = 1; counternumbers <= 19; counternumbers++){ cout << digit[counternumbers] << ", "; } cout << digit[counternumbers];[/CODE] First things first, Arrays are 0 index'ed. This means the first element within the array is 0 not 1. That is your first mistake. Number 2, you have an array of size 19 …

Member Avatar for dr.eu
0
95
Member Avatar for ninja_gs

Note there is also no such thing as this #include<stdio> it should be csdtio.... but you can ditch that if you change getch() to cin.get() Please don't blame a compiler/IDE for your mistakes. By the way Dev-Cpp is dead IDE. It's advised you swap to Visual C++ (express 2008 its …

Member Avatar for ninja_gs
0
141
Member Avatar for antonis233

[QUOTE=Narue;757877]That's nice. Have fun.[/QUOTE] That's the no-shit way of saying, read the posting rules before you make a post. Also it helps to ask a question and present us with some problematic code or logical issue. I'm sure you can find the posting guidlines thread. Also learn to use code …

Member Avatar for Freaky_Chris
0
48
Member Avatar for Passiongamer25

If you want us to comment on your sort code, simple past the sort code and thats it. this is the pseudocode for a bubble sort [code]procedure bubbleSort( A : list of sortable items ) defined as: do swapped := false for each i in 0 to length(A) - 2 …

Member Avatar for ddanbe
0
650
Member Avatar for gunsmith2112

There are MANY problems with you code i'm just gonna post a few to get you started with something to sort out. My first comment is that you should be using [iCODE]#include <ctime>[/iCODE] rather than time.h number 2:[code=cplusplus]char* getMessage(const int messageId) { return messages[messageId].c_str(); }[/code] You have not defined messages...i …

Member Avatar for mrboolf
0
143
Member Avatar for lmastex

Then you would of tried and then realized it wasn't possible or failed trying and asked for help and someone would of helped you out. Either way it would of been a learning experience even if it wasn't possible. Chris

Member Avatar for Freaky_Chris
0
106
Member Avatar for anbuninja

[url]http://tinyurl.com/6bdfm[/url] [url]http://tinyurl.com/5r37hk[/url] and my favorite by far [url]http://tinyurl.com/5l7ufy[/url] Chris

Member Avatar for Freaky_Chris
0
105
Member Avatar for singhraghav

[URL="http://www.cplusplus.com/reference/clibrary/cctype/isalpha.html"]isalpha()[/URL] Loop throught the input string, copy any alpha characters across to a new string, just ignore others Chris

Member Avatar for Freaky_Chris
0
112
Member Avatar for ademsaykin

[QUOTE=ademsaykin;757130]Dear Ninwa Thanks for your reply but still I can not write the whole coding structure which I needed.It doesn't make any sense to me. I shoud be able to compile and run it in order to see how it works. I would be very happy if you could write …

Member Avatar for VernonDozier
0
125
Member Avatar for freelancelote

Then it should be [code=cplusplus]ifstream myFile("rawDictionary2");[/code] So it is actually a file object rather than a string object! Chris

Member Avatar for Freaky_Chris
0
216
Member Avatar for lostincpp
Member Avatar for AHUazhu

This is not a C++ programming question. It's an ontroduction...Try posting in the correct lobby next time. In this case that would of been the [URL="http://www.daniweb.com/forums/forum165.html"]community introductions[/URL] Chris

Member Avatar for jbennet
0
62
Member Avatar for singhraghav

[url]http://www.cplusplus.com/reference/clibrary/cctype/tolower.html[/url] Chris

Member Avatar for unbeatable0
0
103
Member Avatar for clutchkiller

Thats because total is never initialized to 0. So you start with a random number from somewhere in the CPU's memory then start incrementing it by 1. This is bad! very bad! Chris

Member Avatar for clutchkiller
0
108
Member Avatar for ninja_gs

please use code tags, and avoid red text many people will be repelled by it! [CODE]define IS_STRING 1 define IS_CHARACTER 2 define IS_INTEGER 3 define IS_FLOAT 4 [/CODE] This is to make a it easy for you to understand, basically writing IS_STRING is exactly the same as writing 1. [CODE]bool …

Member Avatar for som shekhar
0
193
Member Avatar for sjhentges

Please use code tags, [noparse][code=cplusplus][/code][/noparse] also please try to post a specific question. We will not just do the rest of your project for you. You need to actually hve a problem before we can answer it. Chris

Member Avatar for sjhentges
0
132
Member Avatar for Lukezzz

A homepage for a website? If so you should look into HTML/XHTML aswell as things like PHP Javascript...You may find this site helpful [url]http://www.w3schools.com/[/url] p.s if this guess was right your in the wrong forum :D If not a website i'm confused by your question. Chris

Member Avatar for ArkM
0
92
Member Avatar for Ameerah

Indeed, the more time you put into writing your question. Making it clear and clean. The better laid out and grammatically correct, the faster and more accurate your reply will be. Just remember that, the more time you put in the more of others time you get back. It's simple …

Member Avatar for Salem
0
124
Member Avatar for ItecKid

Rather than me explaining it, i'll give you something to look at and think about. try adding the following line into your code, just inside the second foor loop [code=cplusplus]cout << "D: " << d << " B: " << b << " (" << d+b << ")" << endl;[/code] …

Member Avatar for ItecKid
0
135
Member Avatar for jimbob90

You have some very confusing idea's here. Some of which are potentially dangerous. [code=cplusplus]for (int q=1; q > argc; q++){ a.open(argv[q]); }[/code] What do you hope to achieve with this? Firstly if q ever was greater than argc then you would be stuck in an infinate loop, trying to open …

Member Avatar for Freaky_Chris
0
131
Member Avatar for radmaker3

[QUOTE=jbennet;754518]MS Visual C++ Express 2008 Dev C++[/QUOTE] VC++ is a good idea, Dev-Cpp is a dead project don't bother. Instead you could try codeblocks Chris

Member Avatar for jbennet
0
285
Member Avatar for mrnutty

There are alot of people that ask about card games and black jack on these forums. Why don't you search the forum and have a look over other threads solving common problems...also you can look at some example code to help you. Chris

Member Avatar for dmanw100
0
136
Member Avatar for spodder
Member Avatar for ogi1989

I strongly adivse you use code tags [noparse][code=c][/code][/noparse] Also this looks like C code to me... So perhaps you should post in the C forum. Chris

Member Avatar for Salem
0
181
Member Avatar for cbreeze

Welcome to DaniWeb StainlessSteelR? Or are you just taking the code he happened to past and chaning it and still not reading the thread.... I'm not too sure. Anyways I think you will find this most interesting. It solves your problem multiple times. [url]http://www.daniweb.com/forums/thread161095.html[/url] For almost identical code! Chris

Member Avatar for Freaky_Chris
0
2K
Member Avatar for Yaserk88

There's a stray bracket in your while loop, also i think you should be using doubles not ints... Chris

Member Avatar for Ancient Dragon
0
97
Member Avatar for johnalexandersr

[URL="http://www.letmegooglethatforyou.com/?q=Bottom-Up+Merge+Sort"]I'm not too sure[/URL] Chris

Member Avatar for Freaky_Chris
0
168
Member Avatar for MaRtO

Use a couple of substrings to get the IP address since you know its always going to say, Current IP Address: you can use find to find that string, it will return the position in the string of the first character, you can then add 20 to that to give …

Member Avatar for Salem
0
85
Member Avatar for StainlessSteelR

What he is saying is you cannot create an array of size N like that. Arrays are constant and cannot. he suggested the use of vectors, which can be any size and you dynamically add to them! The other option would be a dynamically assigned array... an example of what …

Member Avatar for VernonDozier
0
732
Member Avatar for afg_91320

[CODE]int myArray[10]; myArray[[COLOR="Green"]0[/COLOR]]= 1;[/CODE] That is the array index, note arrays are 0 index'ed meaning the first entry is always at 0 never 1 Chris

Member Avatar for mrboolf
0
300
Member Avatar for Stefano Mtangoo

OK, here is my sugestion...please bare in mind i know nothing about Python GUI and event handling so i cannot really provide any sort of code examples. You need to ensure that the media has loaded correctly before you can play it. So the best way to doing this is …

Member Avatar for Stefano Mtangoo
0
171
Member Avatar for brixton

There shouldn't be a problem here... i just created a simple program to open a file that contains some text in exactly the same mode as you, and called seekg(0, ios::beg) without a problem... you could always try calling f.clear() before hand... Chris

Member Avatar for Lerner
0
176
Member Avatar for FTProtocol

You have to do some manual searching and it is operating system specific. For windows you might wanted to take a look on msdn. You should find these links helpful. [url]http://msdn.microsoft.com/en-us/library/aa364418(VS.85).aspx[/url] [url]http://msdn.microsoft.com/en-us/library/aa365527(VS.85).aspx[/url] [url]http://msdn.microsoft.com/en-us/library/aa364232(VS.85).aspx[/url] Chris

Member Avatar for StuXYZ
0
396
Member Avatar for geffect

You need to learn to debug yourself. use print statements so you can just exactly when it crashed. Use a debugger :shock: step through it line by line until it crashes. Also is the C++ or C? and from now on NEVER user void main() always use int main() and …

Member Avatar for MosaicFuneral
1
99
Member Avatar for coolbuddy059

Indeed, I happen to know of a rather popular Open hacking forum...i use it from time to time for some more obscure code snippets to learn from, normally things that involving working with OS dependant calls. I don't understand why you would want to write a virus when you could …

Member Avatar for boB_K7IQ
-3
127
Member Avatar for SuperSapien

You need to look into operators, You may find this useful [url]http://www.cs.caltech.edu/courses/cs11/material/cpp/donnie/cpp-ops.html[/url] Chris

Member Avatar for Freaky_Chris
0
184
Member Avatar for sept567

[QUOTE=Shinedevil;751660]Well generally, you will always have the ability of a loss. Even the computer defined AI will screw up alot of times. To make it so that it will always win or always draw are almost impossible. There will always be a chance that the Human Opponent will win, wether …

Member Avatar for sept567
0
174
Member Avatar for ronan_40060

Either way you are going to have to make sure you clean up all memory assignments. The bonus of new/delete over malloc/calloc/realloc/free is the fact that new and delete call constructors and destructors of classes (potentially allowing you to clean more memory up easier. This was also the reason for …

Member Avatar for ronan_40060
0
237
Member Avatar for sumitk538

The two previous posters are correct, just a note although the logic behind it is not too hard, i would suggested you go over the manual method on paper so you know for sure what you are doing before you start writting some code. Otherwise you may get even more …

Member Avatar for Freaky_Chris
0
73
Member Avatar for sid78669

Indeed, this statement is like a an if statment its equivelent would look something like this. [code=cplusplus]string myIF(int a){ if(a > 0){ return ", "; }else{ return " "; } }[/code] Hope that makes sense Chris

Member Avatar for jbennet
0
151
Member Avatar for axelgeorge

The reason that doesn't work is because it's an incorrect method of reading what is at point i in the vector. You should be using his method PtrMyVector->at(i); Also i wanna make this comment: do NOT use void main()!!!! use int main() and make sure you return and interger! (return …

Member Avatar for Freaky_Chris
0
103
Member Avatar for amerninja2

You can still use the windows API in your console application. There is no standard sockets implementation. So you need to use API calls, be it Win32 or POSIX. Chris

Member Avatar for MosaicFuneral
-1
223
Member Avatar for ohlaph

[QUOTE=ohlaph;751207]our instructor wants us to use the !variable.eof() so how would I use it without messing things up? Also, I tried the .good(), and it just ran through the file once, didn't actually loop. Second, I used a debugger, it came back with no errors. Which is why I came …

Member Avatar for StuXYZ
0
128
Member Avatar for lllllIllIlllI

This is a common problem, it seems you have to manually include the mail module, this link maybe of help to you [url]http://stackoverflow.com/questions/169897/how-to-package-twisted-program-with-py2exe[/url] Also another suggestion rather than py2exe use bbfreeze [url]http://pypi.python.org/pypi/bbfreeze/0.95.4[/url] Chris

Member Avatar for lllllIllIlllI
0
2K
Member Avatar for mybluehair

guesssheet[y] = s in your if statement it should be == You are trying to set it equal to rather than comparing Chris

Member Avatar for Freaky_Chris
0
81
Member Avatar for watersnow14

Firstly, please don't hijack others threads...start your own in future. Your syntax error is the fact that you have a do..while loop definded as follows [code]do{ //somecode }[/code] with no while statement [code]do{ //somecode }[COLOR="Red"]while(somecondition);[/COLOR][/code] Chris

Member Avatar for AmyH2008
0
289
Member Avatar for cloudedvision

Here this link might help you out if you already know C++ and your just a bit rusty [url]http://www.cppreference.com/wiki/[/url] Brilliant refrence also [url]http://www.cplusplus.com/reference/[/url] has some nice stuff on it Chris

Member Avatar for cloudedvision
0
95
Member Avatar for botter911

[code=cplusplus]#include <string> ... string myArray[] = {"Cat", "Dog", "House"};[/code] Hope that helps, Chris

Member Avatar for Freaky_Chris
0
148
Member Avatar for himanjim
Member Avatar for Freaky_Chris
0
153

The End.