481 Posted Topics

Member Avatar for Nemoticchigga

Can i also point out that those are C functions. If your after the C++ solution it goes something like this [code=cplusplus]#include <ofstream> #include <iostream> using namespace std; int main(void){ ofstream out_file; out_file.open("example.txt"); if(out_file.is_good()){ out_file << "\nHello, World"; out_file.close(); }else{ cout << "Error Opening File"; cin.get(); } return 0; }[/code] …

Member Avatar for Freaky_Chris
0
203
Member Avatar for bugmenot

Just a though but you may need to be a little be more specific when you say graphics... also i would suggest pasting some sample code, that demonstrates the problem Chris

Member Avatar for asifjavaid
0
777
Member Avatar for caoboipro

[QUOTE=Ancient Dragon;729845]Is that even possible? How can a computer program know if sound is actually coming out of the speakers or not? But maybe there's some interface with the sound card API that will indicate that ???[/QUOTE] My guess would be it would get even more specific...I.E different for each …

Member Avatar for Ancient Dragon
0
126
Member Avatar for Erica122883

I think you forgot to state what the problem was, all you did was post the problematic code and a whole lot more code... Chris

Member Avatar for Lerner
0
118
Member Avatar for Nemoticchigga

You could always use something like this....ofcourse you need to adapt it [code=cplusplus]#include <iostream> #include <string> #include <sstream> using namespace std; int main(void){ ostringstream hello; hello << hex << (int)'A'; cout << hello.str(); cin.get(); return 0; }[/code] Chris

Member Avatar for Freaky_Chris
0
153
Member Avatar for STUDENT#101

Whats wrong with cstdlib & cstdio, this is C++ not C. The previous post uses string stream which are brilliant for this. You may also want to consider looking at strtol(). Chris

Member Avatar for Ancient Dragon
0
248
Member Avatar for Bhoot
Member Avatar for Freaky_Chris
0
53
Member Avatar for Helgso

Google -- [url]http://msdn.microsoft.com/en-us/library/aa364418(VS.85).aspx[/url] Always read up on functions before you try and use them. well i think you forgot to declare the variables pathSz, pathBf & bufSz or at least in that scope. Chris

Member Avatar for Helgso
0
2K
Member Avatar for Asen

Hmm.... code tags, there a nice thing [noparse][code=c][/code][/noparse] Also this looks like C to me not C++ Could just be me but i'm quite sure its not C++ Chris

Member Avatar for Freaky_Chris
0
885
Member Avatar for andrewama

Just to note, this sort of thing is better done with a macro [CODE=cplusplus]#define SIZE 101[/CODE] Chris

Member Avatar for grumpier
0
169
Member Avatar for Srynx

think you may need to use the & operator before the variable you are passing. Chris

Member Avatar for bonnie1702
0
80
Member Avatar for Niner710

Read the file line by line, split it into tokens based on spaces, then convert the number token into a double from a string. You may want to look at. getline() strtok() strtod() Hope that helps, Chris

Member Avatar for Lerner
0
211
Member Avatar for at51178

Firstly look at socket programming, to start understanding how to work over a network Chris

Member Avatar for Freaky_Chris
0
69
Member Avatar for nuubee
Member Avatar for something else

Is it just me that thinks this or are cmath & math.h the same thing? Chris

Member Avatar for grumpier
0
127
Member Avatar for Gagless

i would suggest looking at the ascii code for the character. To start with the ascii code for 'A' is 65 and for 'Z' is 90, there rest lie inbetween unsuprisingly. You first step would be to determine ig it is on the right or left hand side. So is …

Member Avatar for Freaky_Chris
0
305
Member Avatar for idontexist

I think i have missed the actualy problem here. Could you explain why you are having trouble with integer division. I see no reason for it not to work if you use doubles. Chris

Member Avatar for idontexist
0
309
Member Avatar for Villanmac

Very little information here, also i've never programmed microcontrollers in C++ only a version of assembly. However the name bsend indicates [B]b[/B]it[B]send[/B] And so that would mean its sending bit via the output pin. Chris

Member Avatar for ArkM
0
229
Member Avatar for cerb63

[QUOTE=cerb63;719743]she wants it to do whats in the description[/QUOTE] You haven't actually presented us with a problem. You have said it should do this, and not actually pointed out where you are stuck...we don't do it for you we aid you. We are not going to write entire sections of …

Member Avatar for Freaky_Chris
0
98
Member Avatar for barbiedoll3

1) Code Tags 2) Provide all the code that is the problem - this is may include header files etc Chris

Member Avatar for Freaky_Chris
0
107
Member Avatar for Nadescio

Firstly you will need to use API's calls. Secondly you will probably need to know something about what information the Joystick actually sends to the computer and how it is interpreted by the driver application for it. Once you know that then you can start work on writing a wrapper. …

Member Avatar for TheBeast32
0
103
Member Avatar for alin_yuhee

1) How doesn't it work? - What errors do you get? 2) Does it compile but not give the expected result? 3) Which section of code is or do you think is the problem? 4) use [CODE][[TEX][/TEX]/CODE] tags If your using C++ code why are you including things such as …

Member Avatar for Freaky_Chris
-1
126
Member Avatar for freelancelote

No there isn't and again no. You would have to write your own. Search the forums its a VERY popular question. It will turn up alot of material for you to look at, including recursive and non-recursive. Chris

Member Avatar for freelancelote
0
88
Member Avatar for hugoboss911

[QUOTE=Salem;718929]> EDIT: im using windows xp pro, if that helps. But which compiler? Not some fossil like TurboC by any chance? > send a high or low signal to the corresponding output pin on a serial port Er, you do know what a serial port looks like right? Or even …

Member Avatar for Freaky_Chris
0
152
Member Avatar for ShadowOfBlood

[QUOTE]It works. I just figured it out this past Sunday.. I am new to the programming world so my "style may not be too good.. [/QUOTE] Your using C syntax in a C++ forum.... Also use [code][/code[tex][/tex]] please @OP rounding it off can be done by adding 0.0005 etc which …

Member Avatar for VernonDozier
0
592
Member Avatar for ardila

Just to summerise incase you don't bother reading, which wouldn't supprise me. 1) We do NOT do homework 2) We WILL help if YOU provide proof of attempts 3) Show where you are stuck 4) Provide detailed information about your problem Chris

Member Avatar for Freaky_Chris
0
180
Member Avatar for amarie

/*BINARY SEARCH PROGRAM BY SUMAIR IRSHAD*/ #include<stdio.h> #include<conio.h> void main(void) { clrscr(); int arr[]={1,3,5,7,9,11,13,15,17,19}; int i,target,start=0,end=10,mid; printf("enter target"); scanf("%d",&target); while(target!=arr[mid]) { mid=(start+end)/2; if(target==arr[mid]) { break; } else if(target<arr[mid]) { end=mid-1; } else if(target>arr[mid]) { start=mid+1; } } printf("target found at %dth location",mid+1); getch(); } Where to start. 1) Use code-tags …

Member Avatar for Freaky_Chris
0
176
Member Avatar for salman1354

For reasing the data i would use a while loops thats condition is the file reading operations its self such as [CODE=cplusplus]while(getline(afile, myString)){ //code here }[/CODE] Chris

Member Avatar for Lerner
0
87
Member Avatar for DragonReborn225

[ICODE]menu (char symbol);[/ICODE] Should be [ICODE]menu (symbol);[/ICODE] Chris

Member Avatar for emotionalone
0
476
Member Avatar for tefismp

[QUOTE=sidatra79;718656]First of all do u know what a bucket sort is? :D[/QUOTE] I'll agree with this, you should do some research as to what a bucket search is. Also how will you be implementing it? Will it be a recoursive bucket sort and thats it. Or will it be a …

Member Avatar for Freaky_Chris
0
164
Member Avatar for christiangirl

Still learning you still seem to have the problem of the fact the first character is not printed. This is because in your loop to print it out backwards you are checking to see if it is > than 0 baring in mind that arrays are 0 index'ed that means …

Member Avatar for Freaky_Chris
0
244
Member Avatar for LADY187

Why are you defining your own PI when cmath comes with M_PI which is alot more accurate than yours? Chris

Member Avatar for LADY187
0
107
Member Avatar for sistasweetpea

using console redirection is not how to read from a text file, [url]http://www.cplusplus.com/doc/tutorial/files.html[/url] is an example of how to read from a text file although it incourages bad things such as while ( !eof ) and .is_open(). But thats for another day Chris

Member Avatar for sistasweetpea
0
116
Member Avatar for Balinor

just a note on the loop [CODE=cplusplus]while (STAMINA || ENM_STAMINA != 0 )[/CODE] I'm not to sure what you think this means exactly (althought its ok this time), but im guessing its not what it actually means. it would be evaluated as follows [CODE=cplusplus]while ((STAMINA) || (ENM_STAMINA != 0) )[/CODE] …

Member Avatar for Denniz
0
90
Member Avatar for robgeek

hmm not to sure why that would be it seems ok to me.... one thing i wanna point out is as follow's its just a little neater [CODE=cplusplus]case 'R': rev_str(); break; case 'r': rev_str(); break;[/CODE] is the same as [CODE=cplusplus]case 'R': case 'r': rev_str(); break;[/CODE] Chris

Member Avatar for robgeek
0
134
Member Avatar for Cleaner007

Yer there is another option that would require someone to right a not to complex script for you. That could check for all duplicate files & folders and move them to a specified location. It shouldn't be to complex either. Plus you can garuntee what will happen that way, Chris

Member Avatar for Cleaner007
0
129
Member Avatar for begyu

Would it not just mean adding some form of a break in the text file? For example enter an 'x' after the first matrix, then the program knowns it finished and can call again for the next. Maybe i missed something?

Member Avatar for Lerner
0
276
Member Avatar for PaladinHammer

Shouldn't thisbe the other way around? [ICODE]parse=newzipcode;[/ICODE] so this... [ICODE]newzipcode=parse;[/ICODE] Maybe i missed something Chris

Member Avatar for Freaky_Chris
0
547
Member Avatar for Liszt

windows.h has a Sleep() function, this will allow you to stall the application for a short period of time each loop, thus reducing the processor usage to 0 or almost. Chris

Member Avatar for Liszt
0
183
Member Avatar for maori

[code=cplusplus]std::cin >> ipadd; commandArg = "ping " + ipadd.c_str(); system(commandArg);[/code] Something along those lines should do you nicely. c_str() is in the string header btw. Chris

Member Avatar for maori
0
342
Member Avatar for tatainti55

[QUOTE=dmanw100;714085]You need to seed the random number generator to make it generate a true random number. Try [CODE]#include <ctime> .... srand((unsigned)time(0));[/CODE] As for not having enought money you may want to try putting "break" statements at the end of your switch cases... but I forget[/QUOTE] He already does seed it, …

Member Avatar for tatainti55
0
174
Member Avatar for Stefano Mtangoo

I would question Zone Alarm, it is very good i have to agree. However it can get very tempramental and be a major cause of blue screens, Comodo is a very good firewall as long as you have the paitents to fully configure it. Every incoming connection of any kinda …

Member Avatar for caperjack
0
262
Member Avatar for jammy's

[QUOTE=chococrack;714219]The answer is most assuredly forty-two.[/QUOTE] Well what else would it be, although i don't feel that this is important enought to be given an answer equivelant to the meaning of life! but seriously, whats the question / problem? Chris

Member Avatar for Denniz
0
327
Member Avatar for mypopope

if you ask me, Dev-Cpp. Used from the start til not long after the start (aka now lol). Nah Dev has stood me in good sted and never let me down Chris

Member Avatar for ArkM
0
142
Member Avatar for Freaky_Chris

Hi, i'm havnig problem with calling CreateThread. The problem is that it gives me a conversion error from const void* to void* [CODE=Ccplusplus]DWORD dwThreadId; HANDLE myThread; myThread = CreateThread( NULL, 0, MyThreadFunction, "HELLO", 0, &dwThreadId); [/CODE] dwThreadId id is the problem, the function is supose to take a pointer to …

Member Avatar for Freaky_Chris
0
276
Member Avatar for afg_91320

That looks right to me, next state it to convert that into code, be it C++ or psuedo. do each point indervidually, don't try and mix them up. Chris

Member Avatar for kenji
0
348
Member Avatar for uae_uae99

To build on what Sci@phy siad, narrow it down to a small section of code aswell. Don't expect us to read all of that when we may only need to look at 5 lines of it! Chris

Member Avatar for sidatra79
0
153
Member Avatar for blackryu21

Not to sure what your actualy problem is but you are assigning X to [0][0] where X is a char that doesn't have a value and is not initialised. So you assign some random value from your memory into the array. NOT GOOD. Chris

Member Avatar for Freaky_Chris
0
104
Member Avatar for cplusplusgeek

Your going into searching and sorting algoithms. If the numbers are in ascending order then you can perform a bnary search which optimizes speed for finding the number. If is is not sorted into order then you must perform a sor of some kinf such as a quick sort. check …

Member Avatar for Freaky_Chris
0
121
Member Avatar for joelogs

[QUOTE=praveensleeps;713389]U should start with Socket programing; reffer to book "beejs guide to network programing " u can do it with in 3 days[/QUOTE] I would question what, i think he may have problems installing a compiler on his pc let alone managing to write a simple hello world application, since …

Member Avatar for Freaky_Chris
0
185

The End.