2,839 Posted Topics
Re: My linux machine says: - bash: color: command not found - bash: cls: command not found - bash: pause: command not found In other words, avoid using system(), it makes your program non-portable... | |
Re: You [i]do[/i] realize that your str2digit function is actually a char2digit function right? I mean if you input a string "123", it'll return 1 | |
Re: It depends on which file you modified. If you've changed a header-file which is included by other (source) files, all those files need to be re-compiled because they depend on the changed header. If you modify a source file which isn't 'linked' to any other files, the compiler will know … | |
Re: Perhaps you're doing something illegal in a destructor somewhere? It's a bit hard to tell without seeing code. [edit] Something horrible like... [code=cplusplus] class crash { public: int foo[]; ~crash(){delete[] foo;} }; int main(){ crash cr; cout << "hi!"; return 0; }[/code] ...will probably have the same effect as your … | |
Re: It's been a while since I've used fedora, but you might also need to install [icode]yum install libstdc++6[/icode] or for 64bit [icode]yum install lib64stdc++6[/icode]. I'm not sure if fedora installs them by default, although yum is pretty good in solving dependencies etc. So I'm not really sure... | |
Re: First things first: What Operating System are you using? | |
Re: [QUOTE=tech291083;964846]Hi, I am new to programming and basically self taught, is it possible to write a small program in c++ that has some GUI elements such as buttons, check box etc and compile the program in a Linux terminal rather than using and complicated IDEs such as Eclipse or NetBeans … | |
Re: [QUOTE=tech291083;964980] Thanks a lot for the reply, I am sorry to post the code since I am not aware of the fact that it belongs to Windows [/quote] The line [icode]#include <windows.h>[/icode] didn't ring a bell ? :icon_wink: [QUOTE=tech291083;964980] , Could you please tell me as to what I should … | |
Re: @nope3d: Test your code first before posting. This (very) simple program you wrote is full of syntax-errors. Also use [URL="http://www.daniweb.com/forums/misc-explaincode.html"]code-tags[/URL] when posting code | |
Re: I ignored it. Here's why: [quote] Your response will help us acquire new advertising campaigns [/quote] I don't like advertisements, so if my response will result in more ads, I won't respond :) @Dani: To be honest, I really didn't like getting this spam in my inbox. If you wanted … | |
Re: I was probably a reply to your thread, until a Moderator decided that it was a thread hijack and splitted the thread. But the email was still send. That what my crystal ball says anyway ;) | |
Re: And if you're interested why that is required, read [URL="http://www.daniweb.com/forums/thread90228.html"]this[/URL] | |
Re: In the constructor (as always in C++) --> [icode]COnscreenKeyboardApp::COnscreenKeyboardApp()[/icode] | |
Re: 3 things: 1. What output are you expecting and what output do you get? We're not really mindreaders here, so you might want to clarify this. 2. When posting code ALWAYS use [URL="http://www.daniweb.com/forums/misc-explaincode.html"]code-tags[/URL] 3. You have a small bug in your code: [code=cplusplus] else if (cost > 10 && cost … | |
![]() | Re: [QUOTE=vs49688;688947]is nobody going to help. I really need to do this.[/QUOTE] My best advice is to contact the original author ( Luigi Auriemma) about this. I'm not going to waste hours of work on this, when the OP (you) isn't showing any effort whatsoever. Besides: this smells a bit to … |
Re: [QUOTE=Ancient Dragon;959347]I suspect many barly know how to turn on the computer too, let alone what google is :icon_eek:[/QUOTE] Which reminds me: XKCD made [URL="http://imgs.xkcd.com/comics/tech_support_cheat_sheet.png"]this [/URL]a few days back, which I found very handy. So I mailed it to all the people who constantly asked me questions about computers. The … | |
Re: [QUOTE=vvinayk;960978] Eroor : class poly doesnot have disp function as member could you please help in finding out the reason behind this error[/QUOTE] The compiler is right, "class poly" doesn't have a disp() function as a member. But the class 'square' [I]does[/I]. So change this line: [icode]void print(poly &abc)[/icode] to … | |
Re: It might help if you actually asked a question instead of just wacking some code online and hope for the best. | |
![]() | Re: [QUOTE=leegeorg07;955461]thanks that got rid of the error, and it works but now it wants to save the words everytime :( what can i do? i know i sound quite noobish but i have no idea[/QUOTE] Post your newest code. |
Re: A correction on Adatapost's post: This line: [icode]std::cout << a << " " << b;[/icode] should actually be : [icode]std::cout << a << " " << [COLOR="red"]n[/COLOR];[/icode] A small typo :) | |
Re: OpenCV. It has simple demo-programs which will have you grabbing images from cams within 5 minutes. | |
Re: [QUOTE=iamthwee;959234]I know you can attach zip files to forum posts. Not sure about snippets.[/QUOTE] Nope. No attachments in snippets. I've been asking for this feature for about half a year now and Dani promised that it [I]will[/I] be implemented. So we'll have to wait patiently :) | |
Re: I've made a [URL="http://www.daniweb.com/code/snippet1010.html"]Class [/URL]in wxWidgets tp display values against time. But you could modify it for your needs. [I][B]Or[/B][/I] you could take the easy way and just use the wxPlotCtrl from wxWidgets :) | |
Re: [QUOTE=philmetz;958970] The system should be able to do the following: a) build a suitable average frame from a given sequence of images b) clearly specify how many persons are present in each of the test frames as well as: i) the position and identity of each of the persons (using … | |
Re: I think the Original poster kinda figured out the problem in the 4 years since he posted this question. | |
Re: [QUOTE=firstPerson;959160] But this statement : [code]a = mobile + pond[/code] Let mobile = 5, and pond = 5 then the above statement becomes a = 5 + 5; a = 10; [/QUOTE] I'd add a semicolon if I were you, just to keep the compiler happy :) | |
Re: Why not use the prt-src button on your keyboard and use the build-in function from Windows? | |
Re: There's an excellent thread [URL="http://www.daniweb.com/forums/thread67837.html"]right here[/URL] on Daniweb with C++-practice problems. | |
Re: [QUOTE=codedhands;955108]I have tried using STL MAP but i do not know how it will perform with so many data in it.[/QUOTE] How much data is 'so many data'. And why haven't you just given it a try yet? | |
Re: [QUOTE=gretty;957713] Is it possible to make this function recursive? [..] I am trying to get the function to find and return the sum of all elements in a vector[/QUOTE] My rule of thumb is: "If it has loops, it can be made recursive" Since this isn't homework (I hope), here's … | |
Re: [QUOTE=xfreebornx;957661]You are required to develop a system to record details of student.[/QUOTE] No I'm not. I finished school quite a few years back. [URL="http://www.daniweb.com/forums/announcement8-2.html"]Here's[/URL] something for you to read. | |
Re: [QUOTE=jp071;956704]This is my first program for embedded system.[/QUOTE] This program will never run on an embedded system unless you're running Windows (CE) on it. So are you? Also, when you say: doesn't work; what doesn't work? And last but certainly not least: [URL="http://www.daniweb.com/forums/misc-explaincode.html"]code-tags[/URL]. Learn how to use them. | |
Re: A few things are wrong with your code: [icode]if (PlayerStamina < 40 || PlayerStamina > 35) {[/icode] You're saying : [icode]if PlayerStamina is smaller then 40 or bigger then 35[/icode].. Read this line very carefully and then tell me ONE number that isn't smaller then 40 or bigger then 35 … | |
Re: [QUOTE=gopi17;956668]okay, i understand...juz wanna ask...is it possible to create a huge array then minimize the array according to the users input... for example [CODE] game[500][500]; then minimize from there... [/CODE][/QUOTE] Why on earth would you want to do that?? First you ask your OS to reserve an enormous amount of … | |
Re: Also keep in mind that some file-types (like jpeg for example) won't compress very well because they're already compressed. What type of files are you trying to compress? | |
Re: [QUOTE=Tom Gunn;956833] But until the next C++ standard comes out, that only works with const int static fields[/quote] That's actually not entirely true. It only works with integral-data types, which means that in addition to [icode]static const int[/icode] also unsigned and char types are permitted to be declared and defined … | |
Re: 16. Solve everyday problems in C: [code] if((!awake) || (moody)) { smoke_sigarette = true; health--; } [/code] I'm a smoker too, drink to much coffee, but I do like sunlight and social contacts:cool: Regards Niek | |
Re: Sounds like a fine idea to me! Are there any other sites who have these fly-traps-threads and do they see a decrease in spam? | |
Re: Or you could use the classs variable [icode]IplImage->imageData[/icode] which is a char pointer to the inline-data of the imageData. | |
Re: First tell us in clear language - what the input of your program should be (provide a sample). - what the output of your program should be (provide a sample). Then show us what you've done so far, and [I]then[/I] we can probably help you. | |
Re: [QUOTE=Ancient Dragon;954480] I wonder what else they have been trying to teach you that is either just wrong or long obsolete??? [/QUOTE] My money is on at least 4 of the following 6 horrible things: - void main() - turbo C - system() - scanf() - <iostream.h> - getch() And … | |
![]() | Re: These lines should give you a compiler error: [code=c] nop = atoi(number_of_people); user usera[nop]; [/code] C does not allow an array to be declared with an (at compile time) unknown amount of elements. If you want to use dynamic arrays, you should have a look at [icode]malloc()[/icode] and [icode]free()[/icode] What … |
Re: Too vague. Show where your problem is. | |
Re: [QUOTE=iamthwee;951007]I'm sorry but you need to be more detailed than that. -Give us some diagram etcs[/QUOTE] [QUOTE=forever23;951914]joining the lines with the tridesclist,indices and vertices[/QUOTE] How is this a descent reply to iamthwee's post? You reposted your first post, but added the word "tridesclist". Do you think someone is going to … | |
Re: [QUOTE=Eric_;951904]No I am not. I have no idea how to do it either. [/QUOTE] here's how to do it: - go to [project]-->[...... properties] - go to [configuration properties]-->[linker]-->[input] - click "Additional dependencies" and add your libs. | |
Re: You could use setw() from <iomanip> Here's how I would do it: (assuming your screenwidth of 80) [code=cplusplus] #include <iomanip> #include <iostream> #include <string> using namespace std; int main() { string sname; cout << "Enter the a sentence " <<endl; getline(cin,sname); unsigned int padding = 40 + (sname.size() / 2); … | |
Re: I'm very sorry to hear that. I hope that your health issues are of the kind that I can wish you a fast recovery. If not, I hope that find a way to life with them. It's always been a pleasure reading your posts and learning new things from them. … | |
Re: empty() should work fine, could you post some code to explain where the problem is? sample: [code=php] if (!empty($row[0])) { $something = $row[0]; } [/code] | |
Re: [QUOTE=ryan_vietnow;924120]Hello tux4life! Post your c++ query in the c++ forum.Many are willing and eager to help you there![/QUOTE] Dude... Look at his rep and post-count :icon_wink: @Tux: Welcome to the wonderful world of DW, I hope you like your stay here :D |
The End.