2,839 Posted Topics

Member Avatar for Siaa

I don't get it. Do you want the program in Python or C++ as posted here-> [URL="http://www.daniweb.com/forums/thread188252.html"]click[/URL]

Member Avatar for Nick Evan
0
117
Member Avatar for vddmanikanta

Did you read [URL="http://www.cprogramming.com/tutorial/statickeyword.html"]this [/URL]already?

Member Avatar for vddmanikanta
0
127
Member Avatar for zoner7

Be more specific. Which arrays? Where do they get values and where do you want to print them?

Member Avatar for Aia
0
102
Member Avatar for Siaa

Just hack your way into the Hubble-telescope and take some pics. The rest should be easy. Start [URL="http://www.catb.org/~esr/faqs/smart-questions.html#intro"]here[/URL]

Member Avatar for nucleon
0
383
Member Avatar for booker

[QUOTE=booker;853185]Hello I think this is easy for experienced C++ users. I want to define and initialize a [512][512] matrix.[/quote] You probably don't. Tell us why you think you should. [QUOTE=booker;853185] The problem is that when I do int matrix[512][512] I get an error and the program it shuts down. I …

Member Avatar for booker
0
190
Member Avatar for xyster

What is 'String' ? What are you sending to this function; can you show how you call it? Because I suspect you want: void update_rw_requests(ReadOrWrite rw, char* algorithm)

Member Avatar for xyster
0
162
Member Avatar for deedub

I don't understand your question? Could you post a few lines of code to demonstrate the problem?

Member Avatar for tux4life
0
2K
Member Avatar for BlackStar

In addition to Narue's code: You could make a counter which only increments if the userinput was valid. When the counter hits 5 > [icode]break;[/icode] That way you'll have 5 correct inputs and nothing more!

Member Avatar for Narue
0
117
Member Avatar for DREAMER546

If this is homework, then tell us what do [I]you[/I] think the output will be and I might test it. [edit] on second look: I already spot one problem: 'i' is not declared, so it won't even compile

Member Avatar for Nick Evan
0
149
Member Avatar for harrykokil

[QUOTE=jephthah;851404]can anyone plz send me an algorithm on controlling liquid propellant boosters using neural networks?? thanks[/QUOTE] click [URL="http://lmgtfy.com/?q=liquid+propellant+boosters+using+neural+networks"]here [/URL]

Member Avatar for ithelp
0
111
Member Avatar for burger87

This : [code=cplusplus] FILE * aFile; aFile = fopen("LogDelete.txt", "a+"); if (aFile!=NULL) { ofstream aFile ( "LogDelete.txt", ios::app ); aFile << "Program run time: " << ctime(&currTime) << endl; aFile.close(); } [/code] is.. well.. ugly ;) The good thing is that you understand that you need to check if the …

Member Avatar for burger87
0
140
Member Avatar for spring3007

[QUOTE=spring3007;819264]I signed up with my Gmail account, and one of the cool things you can do is append other words after your username by utilizing a plus sign i.e. "username+daniweb@gmail.com" [/QUOTE] So a spambot came by daniweb, saw your username, appended '+daniweb' (apperantly you're not the only one that knows …

Member Avatar for jbennet
0
254
Member Avatar for FlamingClaw
Member Avatar for rock9449

[QUOTE=rock9449;851194]sorry i am not looking to spend money[/QUOTE] This internet-thing is kinda new for you isn't it?

Member Avatar for WaltP
0
152
Member Avatar for xcorpionxting

[QUOTE=xcorpionxting;850981]For startes, how do you open an mp3 file in C++ or VB.NET?[/QUOTE] like this: [code=cplusplus] ifstream infile ("Never_Gonna_Give_You_Up.mp3", ios::in|ios::binary); [/code] Next I would start by reading out the [URL="http://www.mpgedit.org/mpgedit/mpeg_format/MP3Format.html"]header[/URL], which would be the 'simple' part of the program

Member Avatar for Nick Evan
0
154
Member Avatar for Aia

[QUOTE=cscgal;846326]I had thought it was self explanatory to be able to exit out of it by clicking ANYWHERE on the page (either inside or outside the window).[/quote] You have too much faith in the intelligence of an average user. "Make it stupid simple" [QUOTE=cscgal;846326] Suppose a user finds a page …

Member Avatar for martin5211
0
315
Member Avatar for xVent

exit() isn't a real great way to end your program, but I can't give you a better alternative without seeing your code. Could you post the entire code if it's not to long?

Member Avatar for Nick Evan
0
136
Member Avatar for Nick Evan

I'm not taking credit for this site, Narue linked to it in [URL="http://www.daniweb.com/forums/thread185647-2.html"]this thread[/URL]. But it's a must-see: [URL="http://redwing.hutman.net/~mreed/warriorshtm/acne.htm"]http://redwing.hutman.net/~mreed/warriorshtm/acne.htm[/URL] I think maybe I'm closest to [B][URL="http://redwing.hutman.net/~mreed/warriorshtm/jekylhyde.htm"]Jekyll and Hyde[/URL][/B] :-/

Member Avatar for Narue
0
320
Member Avatar for Sturm
Member Avatar for happygeek
0
187
Member Avatar for jworld2

Here's a [URL="http://stackoverflow.com/questions/365058/detect-windows-logout-in-python"]nice thread[/URL] about it.

Member Avatar for jen140
0
85
Member Avatar for camonchain

[QUOTE=Clockowl;847450]Coders will have your head for not using argc and argv. xD[/QUOTE] And the lack of [URL="http://www.daniweb.com/forums/announcement8-3.html"]code-tags[/URL] And the use of global variables. And posting absolutely unrelated code to the OP original problem. On topic: Here's a [URL="http://www.cplusplus.com/doc/tutorial/classes/"]tutorial on Classes[/URL], it will help you (OP) to get started.

Member Avatar for jephthah
0
194
Member Avatar for want_to_code

[QUOTE=Narue;846836]Slang tends not to be described well in dictionaries. [url=http://redwing.hutman.net/~mreed/warriorshtm/jerk.htm]This[/url] is a bit closer to what I was going for.[/QUOTE] Awesome site, Someone (I) should start a thread about it in the Geek's lounge :) [instantupdate] [URL="http://www.daniweb.com/forums/thread186948.html"]Click[/URL]

Member Avatar for Nick Evan
0
299
Member Avatar for LouieAnn
Member Avatar for Kungu

Do you know about [URL="http://www.cplusplus.com/reference/stl/vector/"]vectors[/URL]? If you use a 2d-vector ( [icode]vector<vector<string> > [/icode])instead of an 2d array, you wouldn't have to read the filesize before reading the data. You can just push them into the vector as you go, so your problem with running into un-allocated memory will disappear …

Member Avatar for StuXYZ
0
144
Member Avatar for wuzj1988

[QUOTE=ithelp;845700]Nice catch.[/QUOTE] No it's not. He just posted the exact same thing as 'unbeatable0' posted 10 hours earlier, so I wouldn't call it 'a nice catch' at all. :icon_wink:

Member Avatar for wuzj1988
0
162
Member Avatar for moiron

Come on, look at the code closer: [code=c] for(i=0; i<N; i++) { printf("enter a number"); scanf( "%d", &nwr); newary[i] = nwr; } [/code] If the above code fills the array, how would you start by reading it out? Try to find out what each line does and ask if you're …

Member Avatar for jephthah
0
111
Member Avatar for xonxon

[QUOTE=Narue;846718] The code to write a simple binary tree and test the traversals is very simple.[/QUOTE] Yes they are, in [URL="http://eternallyconfuzzled.com/tuts/datastructures/jsw_tut_bst1.aspx"]Narue' s twisted mind[/URL] anyway ;)

Member Avatar for Grn Xtrm
0
88
Member Avatar for ithelp

When I was still working with embedded software, I had to go to a slaughterhouse to reprogram some machine they had. So I was working with my laptop, when they decided to fire up the machine behind me, which was in fact a giant circular-saw that cuts cows in half …

Member Avatar for debasisdas
1
151
Member Avatar for shazzy99

[URL="http://www.functionx.com/visualc/controls/editbox.htm"]Clicky[/URL]

Member Avatar for Nick Evan
0
208
Member Avatar for joejoe55

Have a look at [URL="http://msdn.microsoft.com/en-us/library/ms685035(VS.85).aspx"]this [/URL]link

Member Avatar for Nick Evan
0
134
Member Avatar for jazzezselvan

Compiles fine for me. Post the complete error-message, it usually comes with a line-number, so that we don't have to guess ;)

Member Avatar for jazzezselvan
0
114
Member Avatar for Clockowl

One thing I spot is this: [code] char *file_content = new char [file_size+1]; file.read(file_content, file_size); [/code] Why do you make your array one byte to big? That byte will never get a value. So when you display it, it just dumps out whatever value is on that memory address represented …

Member Avatar for Clockowl
0
997
Member Avatar for clutchkiller

[QUOTE=clutchkiller;788555]... closet terrorist into office so that he could shut down Gauntanamo Bay and release all his muslim friends... [/QUOTE] [sarcasm] Yeah... Because as we all know: #1 All black people are Muslim #2 All Muslims are terrorists Great post... [/sarcasm] :yawn:

Member Avatar for GrimJack
1
316
Member Avatar for Intrade

My answers: (I'm not representing Daniweb here, only my personal views) 1. Why wouldn't I supply a better solution if there is one? Although the OP may not understand the code at first sight, it will help him/her in the future when they have a similar problem. I'm just assuming …

Member Avatar for MidiMagic
0
221
Member Avatar for tonyaim83

> But not working.. What is not working? How did you use the command? > Can U provide small code... [URL="http://www.dreamincode.net/code/snippet77.htm"]Yup[/URL], it took me about 10 seconds on [URL="http://www.google.nl/search?hl=nl&q=getcwd+c%2B%2B&meta="]google[/URL]

Member Avatar for adam1122
0
6K
Member Avatar for ~s.o.s~

[QUOTE=Narue;837047] >Dragonball Kai Dragonball Z without all of the time-wasters? Who wants to bet that it'll end up only being like ten episodes[1]? ;) [/quote] They should've done that the first time. I spend a lot of time watching the first few saga's, but when the Cell-saga started, I was …

Member Avatar for Narue
2
322
Member Avatar for Aelphaeis

[QUOTE=nucleon;841986]You're pathetic.[/QUOTE] [QUOTE=jephthah;841999] come on now, let's be friends, nucleon, you and me. we can go bowling or something :P [/QUOTE] Some people don't get your twisted way of thinking/humour and mistakenly think that your making fun of them. That's what you get with a forum full of geeks. Off-topic: …

Member Avatar for Aelphaeis
0
402
Member Avatar for clutchkiller

[QUOTE=nucleon;842012]Try making [icode]DECLARE_EVENT_TABLE();[/icode] public instead of private.[/quote] Nah, don't do that, it's good as is. However this: [QUOTE=nucleon;842012] try putting this in your code: [code]BEGIN_EVENT_TABLE(MyFrame, wxFrame) END_EVENT_TABLE()[/code] Or, if you aren't goint to have any events, remove [icode]DECLARE_EVENT_TABLE();[/icode] altogether.[/QUOTE] is indeed the answer to your problem.

Member Avatar for clutchkiller
0
229
Member Avatar for yingfo

If I were to make this, I wouldn't use array's, but I'd use a map: [code=cplusplus] #include <iostream> #include <string> #include <map> using namespace std; int main(void) { //store string str = "aab"; map<char,int> total; for (unsigned i =0; i < str.size(); i++) total[str[i]] += 1; //show map<char,int>::iterator it; for …

Member Avatar for Nick Evan
0
159
Member Avatar for badboizEnt

[quote] when a numebr lesser than 0 and greater than 99 [/quote] A number can never be smaller then 0 AND bigger then 99 at the same time. What you mean is: [icode] (number < 0 || number > 99)[/icode]

Member Avatar for badboizEnt
0
145
Member Avatar for dragon_vn_101
Member Avatar for xgmx

You : a. Watch too much star-trek b. Use too much acid. [quote]These weapons could come in handy if we come across hostile aliens, asteroids, meteors, comets, rustyslacker (and his Gay Abyss), terrorists,....[/quote] And don't forget : [B]Pigs. In. Space!!![/B] [edit] Whoops, I missed the fact that he was banned …

Member Avatar for jephthah
0
141
Member Avatar for nav33n

I can second this problem. The thread indicates that is has two pages, but when clicking on "page 2" I get send back to page 1 FF3.08 on WinXP

Member Avatar for nav33n
0
154
Member Avatar for Narue

Same here using FF 3.0.8 (with or without ad-block, doesn't make a difference) Thread looks fine with IE7

Member Avatar for WaltP
0
349
Member Avatar for rom87

[quote][CODE]int Get_val(vector<Suitcase> a,int box_id) { //how do i return the val of the suitcase money_val member ? return ????????? }[/CODE][/quote] How about something like: [code=cplusplus] int Get_val(vector<Suitcase> a,int box_id) { return a.at(box_id); } [/code] And for deletion, you might want to check out the memberfunction [URL="http://www.cplusplus.com/reference/stl/vector/erase.html"]erase()[/URL] You might also want …

Member Avatar for GDICommander
0
91
Member Avatar for nschessnerd

[QUOTE=marco93;840592]Wrong method. Uses Win32 system api to test if frozen.[/QUOTE] Would you mind explaining that, or do you always just throw in some comment and hope that you're right?

Member Avatar for Nick Evan
0
450
Member Avatar for vsha041

[QUOTE=BevoX;840565] Then compile your code again, and you will have a "portable" stand alone app.[/QUOTE] which will only run on PC's with .NET framework 2.0

Member Avatar for tux4life
0
158
Member Avatar for sommanatt
Member Avatar for myle
0
3K
Member Avatar for beddy085
Member Avatar for dawsonhowe
0
192
Member Avatar for delifion

You can't cout a 2d array like that. You'll have to make a nested loop, which loops trough all the elements in the array and prints them one at a time.

Member Avatar for Gerlan
0
488

The End.