420 Posted Topics

Member Avatar for kazek

[QUOTE][CODE=CPP] case 2: di.getmeaning(word);//problem passing arguments [/CODE][/QUOTE] Here, you haven't asked the user to type in a word, so your string will be blank

Member Avatar for kazek
0
2K
Member Avatar for vaisakhpaacet

You'll need to explore a graphical API to create the GUI - this will depend what platform you're running (Or you could explore a cross-platform API such as wxWidgets [url]http://www.wxwidgets.org/[/url] )

Member Avatar for Ancient Dragon
0
77
Member Avatar for mayuning2nd

MingW is a popular windows compiler (for C and C++) - a windows port of the linux GCC tools. have a look here [url]http://www.mingw.org/[/url] I have no idea whether it supports any of the GTK libraries you're using, you will most likely need to google around for windows versions of …

Member Avatar for TkTkorrovi
0
167
Member Avatar for Prithwish

[QUOTE=TkTkorrovi;423368]Would be much more time effective if you would abandon this IDE.[/QUOTE] I think he has already abandoned the old, outdated "turbo C" from the early 1990s, and is now using the modern, standards-compliant 'Turbo C++ explorer' ... There's nothing (that i'm aware of) which is wrong with this newer …

Member Avatar for iamthwee
0
390
Member Avatar for Mitchelle

I assume [i]the main function[/i] is that one called [i]main()[/i] - which is the entry point of your program If a variable is global, that means its declared outside of any functions. (the terms "local" and "global" refer to where in your program that variable is declared. the syntax for …

Member Avatar for Bench
0
71
Member Avatar for tonyaim83

Why have you created your own isspace function? You'd be better off using the one declared in <cctype>

Member Avatar for Bench
0
2K
Member Avatar for karimnouh

Of course some professionals use goto's [u]occasionally[/u] ... with reference to the linux kernel, here's Linus Torvalds' take on goto [url]http://kerneltrap.org/node/553/2131[/url] Although I would put goto's in the same league as Macros, Unions, Multiple Inheritance, reinterpret_cast, placement new .... in other words - all things which you should generally avoid …

Member Avatar for Infarction
0
304
Member Avatar for qaiser
Re: c++

[QUOTE=qaiser;423265]please write the programming code of this reverse contents of array in c++[/QUOTE] Please read this link [url]http://www.daniweb.com/forums/announcement8-2.html[/url]

Member Avatar for Ancient Dragon
0
93
Member Avatar for gaggu82

[QUOTE=Hamrick;423272]There might be a way in the STL to do it, but I don't know. I'd write a search function that finds every occurrence of "is" and then checks to see if the first and last letters are on a word boundary.[/QUOTE] Yep, the STL is handy here, although your …

Member Avatar for Hamrick
0
165
Member Avatar for elle_yuyu

[QUOTE=elle_yuyu;422713]i dont know how to write this code..anyone can help me ?? here are the question : Write a complete program that calculates the wages of an employee for the month(hint : input from user includes year,month,time in/time out for each day in that month.). monday-friday :first 8hrs,Rm50......add.hour RM10/hr. saturday …

Member Avatar for Salem
0
110
Member Avatar for johniselvis

If by 'bridging' you're referring to [URL="http://practicallynetworked.com/sharing/"]Internet Connection Sharing (ICS)[/URL], then click that link for some guides on how to use the ICS which comes with Windows. (What ICS actually does is turn the computer into a router.. although its most popular application is for sharing an internet connection) Could …

Member Avatar for Fest3er
0
785
Member Avatar for psyman_86

you don't need to take value_type out, just make sure the name is fully qualified when using it outside of the class, ie, [CODE][b]node::[/b]value_type node::get_data() const[/CODE]

Member Avatar for psyman_86
0
447
Member Avatar for toko

[QUOTE=toko;420490]Hello, i have been reading the chapter in the book about classes and i have learned everything about them the only question i have now is that wut do you use classes for?[/QUOTE] Have you ever used the [b]struct[/b] keyword to create your own simple type combining several variables together? …

Member Avatar for Bench
0
117
Member Avatar for AdventChildren0

[QUOTE=AdventChildren0;418473]nvm the errors cleared but the problem is it gives out 32 outputs. (your code) I assume 1-26 = A-Z but what is the other 6? [/QUOTE] The output should have been the characters 'A' to 'Z' in octal, 101-132 (that's 26 numbers, not 32). What output did you get? …

Member Avatar for Bench
0
106
Member Avatar for tygerberg

[QUOTE=Salem;416832]To me, it's just another socially unacceptable habit (like smoking). Once widely practised, it is now banned in many places. [/QUOTE] Seems like a fairly blunt view of religion you've got there :) I don't see religion as a problem in itself (We all have to believe [i]something[/i], right?) Afterall, …

Member Avatar for Ancient Dragon
0
129
Member Avatar for dev.cplusplus

[QUOTE=dev.cplusplus;417820]Hi to all, I hope uyou can help with the following situation i have: I have to write a function that receives a parameter, that is unknow until runtime, meaning one of the parameters could be: CString, int, double, bool or something else The function receive additional parameters that are …

Member Avatar for Ancient Dragon
0
76
Member Avatar for Arctic wolf

[QUOTE=Salem;418108]2. You use a pointer, THEN later on test it for NULL [/QUOTE] [QUOTE=Arctic wolf;418125]2. Why is it wrong?[/QUOTE] NULL means that the pointer doesn't point to anything, so using a pointer and testing it for NULL afterwards is an entirely backwards way of doing things. Consider this scenario at …

Member Avatar for Arctic wolf
0
305
Member Avatar for Bench

I wonder if anyone has seen this before - a programming 'language' aimed at young children. Of course, not really a programming language in the usual sense, and certainly not going to produce the next Quake game, but a great idea to introduce people to the basic ideas of programming …

Member Avatar for hbk619
0
134
Member Avatar for Geometroid

[QUOTE=Geometroid;417549]Hello, I'm new to the site here. I say this because there seems to be a fair bit of etiquette here that I could step on so if I do, that's why. [/QUOTE]Welcome to DaniWeb! :) I reccomend reading the threads at the top of the forum marked [b]Announcement[/b] and …

Member Avatar for Tight_Coder_Ex
0
121
Member Avatar for The Dude

woo! right up my street! :D i got 70% .. I guess ALF was an american thing? And i didn't even know the pacman ghosts had names ;) ... also, who's Punky Brewster? The rest are obvious :D

Member Avatar for jwenting
0
54
Member Avatar for The Dude

25/50 ... although i took random guesses at a third of the questions. :) [QUOTE=MidiMagic;417374]This test is not a matter of truth, but of what liberals believe is the truth.[/QUOTE] Most of it has nothing to do with politics. They're all based on statistics and quotations as reported in the …

Member Avatar for Bench
0
62
Member Avatar for kodiak

You don't need to create the entire weapon class inside the player class, (at the moment it seems to be inside the armour class for some reason. This seems to imply that a weapon is an implementation detail of armour. If you don't want this, you can make it stand-alone). …

Member Avatar for Bench
0
231
Member Avatar for NycNessyness

This isn't C++ code, its C. (The two languages are very different) Probably the reason that you get an error when your code exits, is that your declaration of main() is ill-formed. Change your main declaration so that it looks like this - [CODE=C]int main(void) [/CODE] As for your issue …

Member Avatar for NycNessyness
0
887
Member Avatar for mypopope

The best suggestion I can offer is to download a few and try them, see which you like the best. choice of IDE is a personal preference, and shouldn't affect the kinds of programs you can create when you're just starting out with the standard language. in addition to Turbo …

Member Avatar for toko
0
78
Member Avatar for addicted

As Ancient Dragon said, there's always something you can learn to improve yourself For example, another language, different ways of using the language(s) you currently know, design patterns, different libraries/APIs, problem analysis/design, algorithmics, learning other paradigms, machine code.. the list goes on.

Member Avatar for Ancient Dragon
0
103
Member Avatar for toddn149

[QUOTE=toddn149;409914]I have DSL, and was told that there is no speed loss when using a router for up to 4 pc connections. This seems to be confirmed when downloading from one site and surfing the net on my laptop, I do not notice any speed changes. So, on to my …

Member Avatar for pkimandu
0
97
Member Avatar for mauro21pl

[CODE]void BankAccount::check_input(int dollar,int cent,double rate) { if ((dollar<0)||(cent<0)||(rate<0)) cout<<"Illigal values !!!"; [COLOR="red"][B] exit(1);[/B][/COLOR] } [/CODE]Look at this line, and where it is. (Ignore indentation) what happens in this function?

Member Avatar for mauro21pl
0
101
Member Avatar for zandiago

First, look carefully at the compiler errors, and correct spelling/typing mistakes (I see at least one!) Second, where is your struct definition..? (Perhaps you need to read up on how to create a struct)

Member Avatar for iamthwee
0
354
Member Avatar for pokemon123

That depends - Do you have an example you can post of the code where you're reading input from the user?

Member Avatar for iamthwee
0
238
Member Avatar for seacraft

[QUOTE=seacraft;413339]Yes I want to share printer and be able to simply move data/doc/pic files between the two PCs. Sharing is enabled on both PCs but I can only get access to wifes PC while mine is 'inaccessible'. Using 'Find computer' I can see my PC from her side but cannot …

Member Avatar for seacraft
0
161
Member Avatar for mastan

First thing I suggest doing, is looking at this bit of your program carefully [CODE=CPP]enum SquareState { (blank = 's', X = 'X', 0 ='0') }; [/CODE]If you can't spot the errors, do some reading about enums

Member Avatar for Salem
0
114
Member Avatar for pop007

Integers are only capable of representing whole numbers. Have a look what happens when you do this (Remember that both 3 and 100 are integers) [CODE=CPP] cout << 3/100 ; [/CODE] change your variables from type int to type [I]double[/I], and change your [inlinecode]3/100[/inlinecode] to double's - ie, [inlinecode]3.0 / …

Member Avatar for Bench
0
100
Member Avatar for kodiak

Have a look at Beej's guide to network programming. Its geared towards linux, but much of it applies to windows programming too [url]http://beej.us/guide/bgnet/[/url]

Member Avatar for Bench
0
141
Member Avatar for Arctic wolf

[QUOTE=Arctic wolf;413753]Hello Salem, I know that rand() is a pseudorandom. You probably missed this part of my program: [code] void randomize () { srand((unsigned)time(NULL)); } . . . . randomize(); [/code] as you see I seed the generator with current time,therfore the generator should start with a different number every …

Member Avatar for Bench
0
161
Member Avatar for pin

What do you understand by the assignment you've been given? Have you attempted any of it yet?

Member Avatar for Bench
0
99
Member Avatar for khalidxa

[QUOTE=khalidxa;412982]I have been trying to return a two dimensional array in a function but it is getting me no where, please tell me how to do it. the code is as follow : [CODE] int *population();[/CODE] [CODE]int *testCase::population() { for(int i=0;i<3;i++) { for(int j=0;j<2;j++){ matrix[i][j]=rand()%2; } } return matrix[0][0]; }[/CODE] …

Member Avatar for Salem
0
174
Member Avatar for ayk-retail

The problem would appear to be that you're not sorting your entire list, only half of it. look in the loop here [CODE] for (int i = 0; i <l; i++) { big = x[0]; for (int j = 0; j <l; j++) { if (x[j] > big) { big …

Member Avatar for ayk-retail
0
140
Member Avatar for nubbie

yes, reading all your input as a string is one reliable way to do it (That would be my preference). The other reliable way is to use cin as an 'if' or 'while' condition. (Not so great, because you have to deal directly with the cin error flags every time) …

Member Avatar for WaltP
0
122
Member Avatar for mooncry

[QUOTE=mooncry;412975] 1. Where can i find a ISO 10646\ Universal character names Code charts ? [/QUOTE] If you're on Windows, you could use the windows character map. Make sure that you select the font which matches that of your output window.

Member Avatar for vijayan121
0
134
Member Avatar for ashok_kumar786
Member Avatar for gopi kannan

[QUOTE=vijayan121;412041]completely incorrect. the current version of turbo c++ (the free version is now called 'Turbo C++ Explorer') does support standard ANSI C and ISO/IEC C++ languages and libaries.[/QUOTE]From what i've seen, the chance is, anyone posting here claiming to use "turbo C", is most probably referring to the original Borland …

Member Avatar for WaltP
0
216
Member Avatar for eyedea2011

[QUOTE=bops;411254]Posting the errors your get when you try to compile the code would help. [code] // A tip: you don't need to write using std::cin; using std::cout; // If you have.. using namespace std; // Because std::cin and std::cout are all part of the std namespace, so that one line …

Member Avatar for JRM
0
125
Member Avatar for Earth Wyrm

Perhaps, while you're learning, it would be a good idea to leave all the windows stuff alone. at least until you've got a firm grip on the basic language. There's alot less that can go wrong when you're just dealing with C++ on its own.

Member Avatar for Earth Wyrm
0
166
Member Avatar for mauro21pl

[QUOTE=Ancient Dragon;409373]which line ? On line 18 the value of ptr2 is random because it is uninitialized. Line 22 is also random because it is deferencing the integer located at the address of the address, which also has not been initialized and could possibly crash the program. I don't know …

Member Avatar for Ancient Dragon
0
99
Member Avatar for mauro21pl

Narue has written an excellent (but somewhat lengthy) article about pointers If you care to learn more about pointers its well worth the read [url]http://www.eternallyconfuzzled.com/tuts/languages/jsw_tut_pointers.aspx[/url] [I]edit[/I]: Another good article, from DaWei, can be found here [url]http://daweidesigns.netfirms.com/cgi-bin/pointers.php[/url]

Member Avatar for Bench
0
108
Member Avatar for mauro21pl

it would appear that you're using the wrong kind of single-quote mark (Some character sets have several different ones). you should be using ' ' rather than ` ` (did you copy the code out of a word document or powerpoint presentation?) Ancient Dragon's solution is the easiest (You'll have …

Member Avatar for Ancient Dragon
0
102
Member Avatar for quintoncoert

have a look at these links here - [url]http://users.aber.ac.uk/auj/voidmain.shtml[/url] [url]http://faq.cprogramming.com/cgi-bin/smartfaq.cgi?answer=1044841143&id=1043284376[/url] [url]http://www.parashift.com/c++-faq-lite/newbie.html#faq-29.3[/url]

Member Avatar for Salem
0
619
Member Avatar for harshbhatt88

[QUOTE=harshbhatt88;408444]I dont know what to do in further program. Please make me the rest of the code. Thanks in advace[/QUOTE] 1) Don't be so lazy, read here [url]http://www.daniweb.com/forums/announcement8-2.html[/url] 2) This is a 'C' program. you're in the C++ forum.

Member Avatar for harshbhatt88
0
115
Member Avatar for Firestone

[QUOTE=quintoncoert;401584]@ narue unless of course someone else knows exactly what she means.[/QUOTE] I expect the reason is that C is still the most widely used general purpose programming language. It doesn't really matter what features are available in C++/Java/etc when an existing system is written in C - many jobs …

Member Avatar for Rashakil Fol
0
374
Member Avatar for Firestone

[QUOTE=Ancient Dragon;408007]Sorry, but the two are not interchangeable. [b]int space [] [/b] causes illegal syntax error message (VC++ 2005 Express compiler.). Unless that is something new in C99 standards, which very few compilers support yet.[/QUOTE] Hmm, I just tried that on Comeau in strict C90 mode (Comeau tends to be …

Member Avatar for narendharg
0
122

The End.