5,237 Posted Topics

Member Avatar for nimmi

[url]http://www.daniweb.com/techtalkforums/announcement8-2.html[/url]

Member Avatar for Salem
0
61
Member Avatar for Latifa

Show your effort now, then we can help you with the next step. [url]http://www.daniweb.com/techtalkforums/announcement8-2.html[/url]

Member Avatar for jdarvwill
0
128
Member Avatar for blairwitch

What sort of expertese do you already have when it comes to writing windows programs in C++ ?

Member Avatar for Salem
0
72
Member Avatar for peerusman
Member Avatar for peerusman
0
310
Member Avatar for CDROOM

> printf(" sum sequare from %d to sequare%d is %d",m,n,sum); Maybe put this line outside the for loop? Does it print the right answer on the last iteration of the loop?

Member Avatar for cime63
0
131
Member Avatar for rowly

By providing a member function for your stack abstraction class which returns 'isFull'. Stacks normally have no upper bound to the amount they can store, so perhaps the first thing you get to notice is an exception.

Member Avatar for rowly
0
97
Member Avatar for kararu

I've just explained how to do threads with classes here [url]http://forums.devshed.com/c-programming-42/multithreaded-server-class-393019.html[/url] To be honest, tackling threads before you've got the rest of C++ well sorted out in your head is a receipe for disaster.

Member Avatar for Salem
0
108
Member Avatar for F.T.L.O.T.G

Does your coke machine do anything more than - take money - give can of coke - give change ? Take your assignment and put it in your favourite word processor, and reformat it so there is plenty of white space after each sentence with words like "shall", "must", "should" …

Member Avatar for Salem
0
234
Member Avatar for sciconf
Member Avatar for Salem
0
119
Member Avatar for shadowmoon

Split from [URL]http://www.daniweb.com/techtalkforums/thread15252.html[/URL] Don't bump old threads. Please use the tags in future. Also, we need a better description than "it doesn't work".

Member Avatar for andor
0
485
Member Avatar for suhasrao
Member Avatar for johnnyrocket

Well this being C++, I would go with something like [code] class csvRow { public: parseLine(std::string); std::string operator[](int) const; private: std::vector< std::string > row; }; [/code] Where parseLine takes a line and splits out all the comma separated values, and stores them in the internal vector. The overload of the …

Member Avatar for iamthwee
0
5K
Member Avatar for usr1971ca

Ignoring the file issue for the moment, how does the program get a single 'm' and 'a' value? On the command line, like [inlinecode]./testprog 10 20[/inlinecode] Or as a prompt from within the program [inlinecode]Enter m and a values 10 20 [/inlinecode]

Member Avatar for WaltP
0
129
Member Avatar for Jean5

I'm wondering how many boards I'm going to see this spam on.... In fact, it appears in so many places (thanks google) that I regard it as marketing spam to make people click on the link rather than any serious attempt to ask a meaningful question.

Member Avatar for DMR
-1
187
Member Avatar for computerages

Moving it to the "job offers" forum gets my vote. It's also being broadcast all over the net [url]http://forums.devshed.com/c-programming-42/remainder-program-in-c-390830.html[/url]

Member Avatar for Salem
0
274
Member Avatar for clb2196

> How do I test the round robin? By having them last a lot longer than one schedule interval. There's not much point if they do one thing and then quit, you're not going to see much of anything. Waiting for each one to exit in turn doesn't help either. …

Member Avatar for Salem
0
235
Member Avatar for saqib

> i want to write a program which could convert given temperature and its unit into oher scales Start with centigrade to centigrade. Very trivial conversion, but it at least gets you to attempt the first part of actually attempting the "prompt the user and get answers" part of the …

Member Avatar for saqib
0
282
Member Avatar for TravisC555

> [INLINECODE]if (operation != 'A' || 'a' || 'S' ||[/INLINECODE] There is no compare with a list type function, you need to compare with each one in turn [INLINECODE] if (operation != 'A' || operation != 'a' || operation != 'S' ||[/INLINECODE] Look up the toupper() function [INLINECODE]operation = toupper(operation);[/INLINECODE] …

Member Avatar for TravisC555
1
181
Member Avatar for hoosier23

Why did you make it static? It makes ALL the accounts have the same annual interest rate, and that's simply not true in the real world. You need this just before your main [code] float SavingsAccount::annualInterestRate = 0; [/code] > using namespace std; Putting this in a header file is …

Member Avatar for Salem
1
189
Member Avatar for Fatshadow

> and wondered if anybody here and also done this? Assume the answer is "no", what is your next question going to be? Then assume the answer is "yes", what is your next question going to be? Or are you just conducting some kind of survey to see which boards …

Member Avatar for Salem
0
1K
Member Avatar for sameer.mastek

Basically a duplicate thread of this [url]http://www.daniweb.com/techtalkforums/thread55862.html[/url] Closed.

Member Avatar for Salem
1
217
Member Avatar for Sashar400

See also [URL]http://www.daniweb.com/techtalkforums/thread56253.html[/URL] > [COLOR=#0000ff]using[/COLOR][COLOR=#0000ff]namespace[/COLOR][COLOR=#000000] std; Now I don't know whether this is an endemic problem with your coding, but it should be [/COLOR][inlinecode]using namespace std;[/inlinecode], that is, there is a space in there. Now maybe it's you or maybe it's some damn fool code colouring script you're running which …

Member Avatar for rinoa04
1
193
Member Avatar for n3st3d_l00p

Error messages come with line numbers. Use those line numbers to find out where in the code the problem is. Any editor should have a "goto line" feature, or at least display line numbers in some manner. Post code (annotated with line numbers if necessary) along with exact error messages …

Member Avatar for Salem
0
221
Member Avatar for Iqbal_h_a

> My question is if it is allowed to declare [I]char[/I] fields inside a structure Yes, you can have chars in struct, you can even have char arrays in structs or pointers to chars. You can even have a char bitfield, but only with fewer bits as already noted. > …

Member Avatar for Salem
0
214
Member Avatar for Diode

Use the win32 API as referenced in the examples of the cprogramming.com FAQ. Even if you manage to load ansi.sys, it will only work for true DOS 16-bit applications (which implies some crusty old compiler like turboC). Anything compiled in win32 will simply ignore it. You could always use ncurses …

Member Avatar for Salem
1
199
Member Avatar for mightymousenick

> Since this exercise is on STL queue handling, the ranking of candidates found in a ballot should be organized as a queue The assignment tells you what to use. So a queue containing pairs of "who" and "how many" would seem to be the thing.

Member Avatar for mightymousenick
1
133
Member Avatar for linq

> here no matter I use "&" or not it results the same. Well one or the other is going to produce at least a compiler warning. Choose the one which compiles cleanly. > why is that? Sometimes, despite the programmers' best efforts to make a mess of it, it …

Member Avatar for Ancient Dragon
1
90
Member Avatar for bkas3
Member Avatar for Salem
1
61
Member Avatar for saravana_ssk

> I want function called [B]void ten (void);[/B] to go into c particular memory range. You can, but why would you want to? Both your operating systems are perfectly capable of running the code at the default address the linker gives to the function. If you move it too far, …

Member Avatar for Salem
0
102
Member Avatar for champos

In order of preference strtol() - does conversion and will report numeric overflow / underflow and tell you how much data was processed sscanf() - like strtol() without the over/under flow atoi() - pretty useless atoi("0") and atoi("hello") may both return 0

Member Avatar for ~s.o.s~
0
2K
Member Avatar for sugantha

Does your borland compiler also work if you include iostream (only) to get cin and cout ?

Member Avatar for Salem
1
129
Member Avatar for MrLew

> I am being returned incorrect values for circum and area variables. You got the calculations the wrong way round area is pi*r*r circumference is pi*2*r > return x,y; This does NOT return two values, it returns y Also, you're using a class containing data, there is no need to …

Member Avatar for MrLew
1
206
Member Avatar for bhushanm

Use the debugger and put counting breakpoints on malloc() and free(). For a given file, you're saying that they should be equal. BTW, if you're thinking that free(tree) frees the whole tree, then you would be wrong. From the symptoms you describe, I don't think you're freeing the whole tree …

Member Avatar for jim mcnamara
1
168
Member Avatar for Garadan5567

> Is it possible to somehow reprogram a Coke/Water/Pepsi w/e machine to dispense drinks Doing it would be theft. Telling you would be an accessory to theft. Not surprisingly, both are illegal. Now, if you have a proper programming question to ask, do so in another thread.

Member Avatar for Salem
-1
99
Member Avatar for pradeepmisra

Answers here -> [url]http://www.daniweb.com/techtalkforums/thread55402.html[/url]

Member Avatar for Salem
1
46
Member Avatar for lakshmi.1987

> as i have been asked to implement a simple text editor So a nice simple console editor, with a menu containing a few options a) insert a line b) change / edit a line c) delete a line d) print some lines e) load f) save

Member Avatar for Salem
0
100
Member Avatar for Karthi Msc

[inlinecode]for ( i = 0 ; i < 1<<N ; i++ )[/inlinecode] Just print out the binary representation of i to N bits of precision. Easy money.

Member Avatar for Salem
1
165
Member Avatar for poorni

Read this first - [URL]http://www.daniweb.com/techtalkforums/announcement8-2.html[/URL] > student from engg college So start studying then. Your qualification will be meaningless if all you do is google all your answers or try and get other people to do the work for you. When you do get around to posting your own work, …

Member Avatar for Karthi Msc
1
156
Member Avatar for Flay

Split from this long-dead thread [url]http://www.daniweb.com/techtalkforums/thread31283.html[/url]

Member Avatar for GloriousEremite
1
280
Member Avatar for dsraju

> If no, then why calloc() is returning NULL to the array Well your use of 'far' strongly suggests the fact that you're using an ancient 16-bit compiler rather than a more modern 32-bit compiler. The maximum single allocation you can have is 64K (your array is 128K). @ andor …

Member Avatar for Iqbal_h_a
0
307
Member Avatar for dsraju

> void fun(int **array) The rule about arrays become pointers is not recursive - it only happens for the outermost level of the array. [INLINECODE]void fun ( int (*array)[40] );[/INLINECODE] is one way to declare the function. This is another way, which is easier to remember since it's just copy/paste …

Member Avatar for ~s.o.s~
1
139
Member Avatar for Iqbal_h_a

You've basically written this [code] struct node { int a; struct node { int a; struct node { int a; struct node { int a; struct node { int a; struct node x; // and so on.... struct node *pnext; }x; struct node *pnext; }x; struct node *pnext; }x; struct …

Member Avatar for Iqbal_h_a
1
195
Member Avatar for blahhh101

As in [code] char n1[] = "358"; char n2[] = "235"; int carry = 0; sum = carry + (n1[2] - '0') + (n2[2] - '0' ); // Add "8" and "5", as 8 and 5 result = sum % 10; // ie 3 carry = result / 10; // …

Member Avatar for Salem
1
209
Member Avatar for santosdas

Providing the author did the job properly, all you need to do is recompile it on the target machine.

Member Avatar for Rashakil Fol
1
113
Member Avatar for bh_hensem

So how much have you managed yourself? - reading a line in - separating the number and the word - storing them in an array ? Post what you can achieve, then the answer will be more likely tuned to your specific needs. It also shows you've done some work …

Member Avatar for Salem
0
102
Member Avatar for muhammad amir

[url]http://en.wikipedia.org/wiki/Big_O_notation[/url] > why we ignore constant for example f=100n Because it's meaningless when you're considering the "asymtotic" behaviour. Like 100*infinity is no different to 50*infinity or just infinity. Such minor order terms only come into play for small n, and vary widely depending on such things as - the processor …

Member Avatar for Grunt
1
151
Member Avatar for Starfighter330

[url]http://www.daniweb.com/techtalkforums/announcement8-2.html[/url] You say you've tried something, so post your best effort so far. Don't forget this when you do post code. [url]http://www.daniweb.com/techtalkforums/announcement8-3.html[/url]

Member Avatar for VinC
1
8K
Member Avatar for SHWOO

> for (int i = 0; i <= 12; i++) > for (int j = 0; j <= 11; j++) > for (int k = 0; k < 11; k++) Only one of those loops correctly accesses all the elements of your array. One of them steps off the end, …

Member Avatar for Salem
1
271
Member Avatar for analeah

If they're all in the same directory, then [inlinecode]#include "listdbl.h"[/inlinecode] Then it should find that header file just fine. If you have [inlinecode]#include <listdbl.h>[/inlinecode] Then you need to specify a search path. From the command line, you might try CL /I. prog.c

Member Avatar for Salem
0
320
Member Avatar for the.future.zone

Post your best attempt at the problem so far. Being able to just copy stdin to stdout without any of the substitutions would be a start at least.

Member Avatar for Lerner
0
166

The End.