481 Posted Topics

Member Avatar for 666kennedy

[QUOTE=666kennedy;751535]im trying to show what is stored in arrays, basically to make sure my program is working fine, i have got it to print which element in the array it is, but how do u access the array and show what value is stored in it. my code is basically …

Member Avatar for Freaky_Chris
0
86
Member Avatar for kyosuke0

loop throught all the elements on the stack, check what it is either ()[]{} and use 3 different boolean values, 1 for each brace type ie 1 for () 1 for [] and 1 for {}. then toggle states...if that makes sense and if the state wouldn't chage then you …

Member Avatar for kyosuke0
0
202
Member Avatar for tomtetlaw

Well what idea's do you have for writing a jump function. I guess you would have to think about a couple of things, What exactly is your motion path when you jump, how the direction of movement before hand effects the mothion path of the jump. Also you would need …

Member Avatar for tomtetlaw
0
162
Member Avatar for sleepytoast

Count your brackets srand((P1Cards[i])time(0)); srand((CompCards[i]time(0)); Chris

Member Avatar for VernonDozier
0
126
Member Avatar for rana2011
Member Avatar for Freaky_Chris
0
75
Member Avatar for ItecKid

Um, by wierd output do you mean un sorted. Cause i have a strange feeling (unles si missed something) that you sort (or at least try to) the array list....which is just discarded once your sort is completed. You need to pass by refrence... using the & operator in your …

Member Avatar for Freaky_Chris
0
109
Member Avatar for Lukezzz

Perhaps this is relevant? [url]http://msdn.microsoft.com/en-us/library/system.windows.forms.menuitem.break.aspx[/url] Chris

Member Avatar for Lukezzz
0
131
Member Avatar for C++.java

[URL="http://www.letmegooglethatforyou.com/?q=Sorting+Algorithms"]I have no idea how sorry i can't help[/URL] I'm such a kinda man......after that title

Member Avatar for Salem
-1
129
Member Avatar for Seamus McCarthy

When is the problem, unexpected out put wtc. We cannot judge what you have done incorrectly if you don't tell us how it is wrong Chris

Member Avatar for ku.bis
0
166
Member Avatar for lmastex

Use code tags please [noparse][code=cplusplus][/code][/noparse] Also what exactly is the problem? Chris

Member Avatar for Laiq Ahmed
0
173
Member Avatar for Freaky_Chris

Hi, i'm doing some work with double atm and i have what appears to be a simple expression. When i work this out in my head i get the answer to be 0. However running the code gives me a very obscure value -5.77338e-017 Any help as to what i …

Member Avatar for StuXYZ
0
263
Member Avatar for teddybouch

Hmm quick suggestion probably a crazy one :D does this work static void Test2(list &tester)

Member Avatar for teddybouch
0
116
Member Avatar for AdRock

You can just do the following [code=cplusplus]if(line[0] == '<' || line[0] ==' '){ //some code }[/code] Chris

Member Avatar for ArkM
0
3K
Member Avatar for Freaky_Chris

Hi all, i'm looking into doing a little bit of work with the mouse in console applications on windows. I'm using windows.h to get access to functions such as ReadConsoleInput. I've created a simple program that just prints a string whenever the left most mouse button is clicked. However sometimes …

Member Avatar for Freaky_Chris
0
201
Member Avatar for DemonGal711
Member Avatar for DemonGal711
0
100
Member Avatar for JackDurden

Note you can use find() or find_first_of() etc to get the index of the character youare after. Chris

Member Avatar for cikara21
0
223
Member Avatar for raja289
Member Avatar for lllllIllIlllI

Could you use EmulateKeyPress() after that to send a backspace to it? Chris

Member Avatar for Freaky_Chris
0
240
Member Avatar for Michigan_Guy

This looks to me like you are going to be going into threads and mutex. You should have a good look on google on how to use threads. You could spawn a new thread to control the Opponents attacks, since they require no user imput all that would be happening …

Member Avatar for jbennet
0
111
Member Avatar for Shinedevil

I personally would use a string... [code=cplusplus]#include <string> ..... string myString; cout << "Enter a number\n>>"; getline(cin, myStrnig);[/code] And then you may want to readinto the cctype header, which will give you some useful functions like isdigit(). Chris

Member Avatar for StuXYZ
0
202
Member Avatar for hydrobat

Yes there is it's pretty simple too [code=python]mylist = ['blue', 'red', 'green', 'green', 'red', 'red'] for word in set(mylist): print word, "appears", mylist.count(word), "times."[/code] Hope that helps. Chris

Member Avatar for hydrobat
0
118
Member Avatar for SlayerX

[QUOTE=SlayerX;745667]oh..thx guys.....but i still cant do it....need some beginning codes...as u know im still beginner....well..hope u can help me thx!![/QUOTE] You are NOT going to get a code solution. Either give in trying or post what you think you should be doing in words, pseudo-code or some method of displaying …

Member Avatar for Salem
-1
321
Member Avatar for serleon

Infraction did say it was a rough idea, not the exact code to use. Also the ifstream takes C Strings, the function c_str() isfound in the string header and converts string object to C Strings, incase you were not aware of this. Chris

Member Avatar for StuXYZ
0
402
Member Avatar for mybluehair

[QUOTE=StuXYZ;745857]I think that the problem is that section is a char array and you have the problem that you have to convert them to integers first, otherwise they have their ascii value. e.g. 1 is 49 (I think) So isolate the number part of section and convert to an integer/double …

Member Avatar for Freaky_Chris
0
109
Member Avatar for johntayler

Before you take a tutorial in dreamweaver which is a very good choice. I would reccomend learning how to post a question. For starters this is a web design question NOT a Java Programming Question. So why is it in the Java Topic? I would also reccomend that you have …

Member Avatar for stultuske
0
74
Member Avatar for 666kennedy

to seed the random number with srand the *best* method is as follow. [code=cplusplus]#include <ctime> ... srand(time(NULL));[/code] Note you only need to seed rand once in your program. Chris

Member Avatar for Freaky_Chris
0
127
Member Avatar for jakeiscrazy

Your gonna need to provide alot more information. For example what are you programming exactly..some kind of mirco controller. Each micro controller is different and the dll file you have been given will vary for each also. So it is not so much a C++ question. It is more a …

Member Avatar for Salem
0
521
Member Avatar for karang
Member Avatar for Agni
0
90
Member Avatar for aodpreacher

The logic behind the memory is not too complex. At the start of the game Create a list containing all of the sequence. And then compare the button press with the value in the correct list position. for example the first button press should be equal to the value stored …

Member Avatar for Freaky_Chris
0
100
Member Avatar for AcidG3rm5

Have you ever read about strtok? [url]http://www.cplusplus.com/reference/clibrary/cstring/strtok.html[/url] Chris

Member Avatar for AcidG3rm5
0
331
Member Avatar for khalidmehmood
Member Avatar for Freaky_Chris
0
149
Member Avatar for Lokolo

call me silly but why not just send the data straight to the correct file name. Also i would recomend you do all file copying in binary mode to prevent loss of any data. Chris

Member Avatar for brechtjah
0
173
Member Avatar for tnvkrishna

VC++ Use "CLR" Which is managed code, using MFC wrappings etc. But it does support ISO / ANSI Standards well and is a good compiler. Grr i hate to think of Dev being dead can everyone stop pointing it out lol Chris

Member Avatar for jbennet
0
219
Member Avatar for Arctic wolf
Member Avatar for Arctic wolf
0
654
Member Avatar for Kainan54
Member Avatar for Freaky_Chris
0
169
Member Avatar for Falkoner1

Having an ascii game that uses a GUI inventory just screams confused at me. Chris

Member Avatar for Freaky_Chris
0
103
Member Avatar for Kcube989

You really need to get your head around the logic, lets say (since im guessing you are using a 2d array for your board) your board is arrange something like this small scale - - - - - - - - - - - O - - - x O …

Member Avatar for Freaky_Chris
0
74
Member Avatar for Jason123

[URL="http://www.cplusplus.com/reference/clibrary/cstdlib/strtol.html"]This[/URL] may help you out with converting string literals to numbers. Chris

Member Avatar for ArkM
0
179
Member Avatar for Chaudharybilal

Spawn a thread to count two seconds, after that make your tread force '\n' into the keyboard buffer and there you go Chris

Member Avatar for Chaudharybilal
0
125
Member Avatar for abhaydiwan

If you have to implement a quicksort, then i suggest you do. Have a read [url]http://en.wikipedia.org/wiki/Quicksort[/url]

Member Avatar for wimper
0
130
Member Avatar for M00nDancer

Start of by giving us an example of your code. So we can see where you are going wrong. Also pointing us to the bit you think is the problem would be good.

Member Avatar for ArkM
0
101
Member Avatar for scjohnny
Member Avatar for scjohnny
0
109
Member Avatar for darren2005

usethe string header so you can get the path from the user then pass it to chdir like this [CODE=cplusplus]chdir(path.c_str());[/CODE] Chris

Member Avatar for darren2005
0
2K
Member Avatar for localp

[QUOTE=localp;732485][icode]return (str[29]);[/icode] but no use still errors[/QUOTE] thats a char your returning, still not a char array.

Member Avatar for ArkM
0
130
Member Avatar for faisaly

[QUOTE=faisaly;732351]Considering the given code as an algorithm calculate the time complexity of this code. #include<iostream> #include<stdlib.h> using namespace std; int main(){ int i, j, n; for(i=0;i<n; i++){ for(j=0; j<n; j++){ cout<<"my time complexity is = "<<i*j<<endl; } cout<<"complexity is increasing"<<j<<endl; } system("pause"); return 0; }[/QUOTE] Code tags please [code=cplusplus][/[TEX]][/TEX]code]. Also …

Member Avatar for Freaky_Chris
0
135
Member Avatar for muya08

You should check how to use If & Else stantements, you have [CODE=cplusplus]if(standarddeviation>0){ cout<<"standardeviation: "<<standarddeviation<<endl; else cout<<"standarddeveiation not valid."; }[/CODE] This is wrong due to bracket positioning it should be [CODE=cplusplus]if(standarddeviation>0){ cout<<"standardeviation: "<<standarddeviation<<endl; } else{ cout<<"standarddeveiation not valid."; } [/CODE]

Member Avatar for ArkM
0
136
Member Avatar for volscolts16

Im guessing you mean in relation to realy time, you may want to use CLOCKS_PER_SEC to get things in terms of time and in terms of time to clocks for example divide clock()/CLOCKS_PER_SEC withh give you how many seconds, etc and if you want to wait for x seconds do …

Member Avatar for ArkM
0
122
Member Avatar for techgenie
Member Avatar for needhelpincplus

Firstly NEVER use void main() always int main() (of some variation). Secondly do you know how functions work? [code=cplusplus]void selectionSort(int onestudent[], int x);[/code] What is that doing inside your main method? [code=cplusplus]void selectionSort(student onestudent[] , int listLength); void selectionSort(student onestudent[], int listLength){ for (int i = 0 ; i <= …

Member Avatar for Freaky_Chris
0
106
Member Avatar for clutchkiller

without the function call aswell it is hard to see what the problem is. Chris

Member Avatar for clutchkiller
0
136

The End.