2,839 Posted Topics

Member Avatar for GANTOR

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...

Member Avatar for Nick Evan
0
144
Member Avatar for tux4life

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

Member Avatar for tux4life
0
269
Member Avatar for atch

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 …

Member Avatar for atch
0
80
Member Avatar for daviddoria

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 …

Member Avatar for NicAx64
0
2K
Member Avatar for Ancient Dragon

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...

Member Avatar for Nick Evan
0
259
Member Avatar for jarrax
Member Avatar for umarmaqsood

[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 …

Member Avatar for Nick Evan
0
342
Member Avatar for tech291083

[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 …

Member Avatar for Nick Evan
0
2K
Member Avatar for pyro_junky

@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

Member Avatar for Nick Evan
0
94
Member Avatar for darkagn

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 …

Member Avatar for Chaky
0
175
Member Avatar for Chaky

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 ;)

Member Avatar for Chaky
0
136
Member Avatar for Der_sed

And if you're interested why that is required, read [URL="http://www.daniweb.com/forums/thread90228.html"]this[/URL]

Member Avatar for mrnutty
0
155
Member Avatar for Majestics

In the constructor (as always in C++) --> [icode]COnscreenKeyboardApp::COnscreenKeyboardApp()[/icode]

Member Avatar for GDICommander
0
193
Member Avatar for ScienceNerd

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 …

Member Avatar for ScienceNerd
0
89
Member Avatar for vs49688

[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 …

Member Avatar for bughunter2
0
260
Member Avatar for Dsiembab

[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 …

Member Avatar for GrimJack
0
199
Member Avatar for vvinayk

[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 …

Member Avatar for kvprajapati
1
119
Member Avatar for xfreebornx

It might help if you actually asked a question instead of just wacking some code online and hope for the best.

Member Avatar for xfreebornx
0
551
Member Avatar for leegeorg07

[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.

Member Avatar for woooee
0
118
Member Avatar for AssaultM16

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 :)

Member Avatar for mrnutty
0
99
Member Avatar for Tigran

OpenCV. It has simple demo-programs which will have you grabbing images from cams within 5 minutes.

Member Avatar for Tigran
0
161
Member Avatar for Frederick2

[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 :)

Member Avatar for Nick Evan
0
263
Member Avatar for gcardonav

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 :)

Member Avatar for Nick Evan
0
148
Member Avatar for philmetz

[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 …

Member Avatar for philmetz
0
93
Member Avatar for hammondlj

I think the Original poster kinda figured out the problem in the 4 years since he posted this question.

Member Avatar for chandra1984
0
224
Member Avatar for david777

[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 :)

Member Avatar for Nick Evan
0
78
Member Avatar for kkeyan

Why not use the prt-src button on your keyboard and use the build-in function from Windows?

Member Avatar for kvprajapati
0
105
Member Avatar for jiten_raulo

There's an excellent thread [URL="http://www.daniweb.com/forums/thread67837.html"]right here[/URL] on Daniweb with C++-practice problems.

Member Avatar for jiten_raulo
0
142
Member Avatar for codedhands

[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?

Member Avatar for codedhands
0
147
Member Avatar for gretty

[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 …

Member Avatar for Tom Gunn
0
119
Member Avatar for xfreebornx

[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.

Member Avatar for xfreebornx
0
289
Member Avatar for jp071

[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.

Member Avatar for Nick Evan
0
334
Member Avatar for metalclunch

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 …

Member Avatar for vibs123
0
181
Member Avatar for gopi17

[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 …

Member Avatar for mrnutty
0
163
Member Avatar for rajivgupta1107

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?

Member Avatar for bumsfeld
0
185
Member Avatar for larrifari

[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 …

Member Avatar for Nick Evan
0
5K
Member Avatar for MattEvans

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

Member Avatar for ithelp
0
498
Member Avatar for Salem

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?

Member Avatar for ithelp
0
219
Member Avatar for amino0o

Or you could use the classs variable [icode]IplImage->imageData[/icode] which is a char pointer to the inline-data of the imageData.

Member Avatar for vali82
0
368
Member Avatar for kulli

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.

Member Avatar for mrnutty
0
97
Member Avatar for raul14

[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 …

Member Avatar for Salem
0
145
Member Avatar for Lioshenka

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 …

Member Avatar for tux4life
0
161
Member Avatar for Ancient Dragon
Member Avatar for mbulaheni
Member Avatar for forever23

[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 …

Member Avatar for zoner7
0
77
Member Avatar for Eric_

[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.

Member Avatar for Eric_
0
184
Member Avatar for Democles

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); …

Member Avatar for TimeFractal
0
13K
Member Avatar for Ancient Dragon

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. …

Member Avatar for crunchie
0
189
Member Avatar for ChazMan

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]

Member Avatar for jericho034
0
374
Member Avatar for tux4life

[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

Member Avatar for Ancient Dragon
1
285

The End.