2,839 Posted Topics
Re: 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] | |
Re: Did you read [URL="http://www.cprogramming.com/tutorial/statickeyword.html"]this [/URL]already? | |
Re: Be more specific. Which arrays? Where do they get values and where do you want to print them? | |
Re: 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] | |
Re: [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 … | |
Re: 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) | |
Re: I don't understand your question? Could you post a few lines of code to demonstrate the problem? | |
Re: 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! | |
Re: 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 | |
Re: [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] | |
Re: 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 … | |
Re: [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 … | |
Re: [QUOTE=rock9449;851194]sorry i am not looking to spend money[/QUOTE] This internet-thing is kinda new for you isn't it? | |
Re: [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 | |
Re: [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 … | |
Re: 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? | |
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] :-/ | |
Re: happy [URL="http://en.wikipedia.org/wiki/Hoe_(dish)"]hoe [/URL]? | |
Re: Here's a [URL="http://stackoverflow.com/questions/365058/detect-windows-logout-in-python"]nice thread[/URL] about it. | |
Re: [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. | |
Re: [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] | |
Re: 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 … | |
Re: [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: | |
Re: 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 … | |
Re: [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 ;) | |
Re: 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 … | |
Re: [URL="http://www.functionx.com/visualc/controls/editbox.htm"]Clicky[/URL] | |
Re: Have a look at [URL="http://msdn.microsoft.com/en-us/library/ms685035(VS.85).aspx"]this [/URL]link | |
Re: Compiles fine for me. Post the complete error-message, it usually comes with a line-number, so that we don't have to guess ;) | |
Re: 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 … | |
Re: [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: | |
Re: 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 … | |
Re: > 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] | |
Re: [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 … | |
Re: [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: … | |
Re: [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. | |
Re: 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 … | |
Re: [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] | |
Re: 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 … | |
Re: 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 | |
Re: Same here using FF 3.0.8 (with or without ad-block, doesn't make a difference) Thread looks fine with IE7 | |
Re: [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 … | |
Re: [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? | |
Re: [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 | |
Re: Perhaps a debugger like Valgrind will have an option for this? | |
Re: [URL="http://www.daniweb.com/forums/announcement8-2.html"]probably[/URL] | |
Re: 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. |
The End.