3,183 Posted Topics

Member Avatar for blindislands

> I need to put the function double cos(float) in the trig.c file, but I don't know what to do with it when the function cos() is in there too I'm not sure I understand the problem. You're defining the cos() function *as* `double cos(float)`. There aren't two functions, just …

Member Avatar for blindislands
0
553
Member Avatar for BevoX

> @haw03013 > > Bullshit What an insightful way to bump a year old thread. Can you elaborate any?

Member Avatar for Microno
1
678
Member Avatar for wmarquez

Let's use `t[z].suba = a[ w ][ v ];` as the example. Both suba and a have the same type (`float**`), so why are you subscripting a when trying to assign directly to suba? I suspect you're trying to copy the whole matrix: t[z].suba = a; This of course has …

Member Avatar for deceptikon
0
205
Member Avatar for anukavi

> I have got an integer as 0010000001. Just so you're aware, leading zeros are typically truncated as they don't contribute to the value and are conceptually infinite. So your number would be 10000001 unless otherwise formatted to ten digits with leading zeros. That doesn't affect your algorithm, but it's …

Member Avatar for Lucaci Andrew
0
1K
Member Avatar for hister

> i want to show from 100 to 999 but it start at 701 !!! It doesn't start at 701, that's just where as far back as the command prompt allows you to scroll. Try this and use the Enter key to continue to the next "page": for (n1 = …

Member Avatar for deceptikon
0
197
Member Avatar for Asotop

A note on terminology, a char is a single character. You want to split a *string* of char. As for how to go about it, look up [strtok()](http://www.cplusplus.com/reference/clibrary/cstring/strtok/).

Member Avatar for deceptikon
0
84
Member Avatar for GottaLove

You can't overload the same operator with the same signature more than once because then the two overloads would be ambiguous. Your best option here is to discard operator overloading and use regular member functions, with the simplest solution being one per task: bool Point2D::lessX(const math& p) { return x …

Member Avatar for deceptikon
0
198
Member Avatar for rithish

> can we implement these concepts in c using linkedlist and array???? Yes, of course. Though typically when working with anything called a "matrix", arrays are the more natural data structure. For storage efficiency reasons, linked lists become useful when your matrices aren't very full. This is where the sparse …

Member Avatar for deceptikon
0
181
Member Avatar for john.eisma.5
Member Avatar for deceptikon
0
84
Member Avatar for angelo.uknown

A search for "GMP manual" on Google produced this as the first hit: http://gmplib.org/manual/ All totaled up it took me all of 2 seconds. How hard did you search before giving up?

Member Avatar for deceptikon
0
246
Member Avatar for revelator
Member Avatar for DavidB
0
182
Member Avatar for Reverend Jim

> Is this by design? Yes. The idea is that when you view the first thread in a forum, all subsequent threads are marked read. If you respond to a thread then that thread becomes the first, and by viewing it the marked read logic applies. > My expectation is …

Member Avatar for blud
0
263
Member Avatar for np complete

Sticky threads are nearly always contributed by regulars of a forum. So if you want a sticky, start a thread with whatever topic you want stickied, then make a moderator aware of it. :)

Member Avatar for LastMitch
0
791
Member Avatar for gotto

> Yes. I understand that this is the most impossible thing ever, but is it possible? You think free web hosting is impossible? Have you done *any* research? Seriously, fire up google.com and you'll find no end of free options. They typically limit things like available space or include advertisements, …

Member Avatar for Aladinone
0
226
Member Avatar for McLaren

> is there sometimes excuse for dublicating code? Yes. There's an excuse for breaking any best practice guideline. > So how can you explain - how would I solve my situation which I decscribed I'm not sure I see the wisdom of fixing a pervasive bug in only one place. …

Member Avatar for McLaren
0
169
Member Avatar for <M/>

> I don't know if it is just me but does the footer look different by any chance? Things are always being tweaked for SEO or user experience purposes. Most of the time nobody notices. ;)

Member Avatar for deceptikon
0
64
Member Avatar for lifuno
Member Avatar for cutterpillow20

In Turbo C you can use gotoxy(), and for the highlighting you'd probably use textcolor(). Read the documentation for further details about those two functions. [URL="http://www.urbandictionary.com/define.php?term=inb4"]inb4[/URL] don't use Turbo C.

Member Avatar for Ancient Dragon
0
1K
Member Avatar for leecheneler

> yes daniweb is not user friendly and it should allow its users to delete their thread Yeah, allowing members to arbitrarily destroy the continuity of the forum and alter *other* members' posts on a whim is such a fantastic idea... :rolleyes: You sound very selfish, dude. By the way, …

Member Avatar for deceptikon
-1
101
Member Avatar for dbickel

> I dont even know where to start since I am struggeling with the whole pseudocode process. Pseudocode is nothing more than a structured way to organize your algorithm's steps. For example, the following is a valid (but largely useless as it stands) pseudocode program: Open the east file Sort …

Member Avatar for dbickel
0
275
Member Avatar for hexes

> strcmp will not do good, u have to use strstr() If you want to count exact full lines then strcmp() is better. If you want to count lines containing a substring then strstr() is better. The two accomplish different goals.

Member Avatar for deceptikon
0
236
Member Avatar for ntggl19

You're vastly overcomplicating trivial stuff and ignoring important stuff. Compare and contrast your code with this: #include <stdio.h> #include <stdlib.h> #include <string.h> #define MAX 3 #define LEN 100 char **func(void) { char **ptr = malloc(MAX * sizeof *ptr); /* Always check malloc for failure */ if (ptr) { size_t i; …

Member Avatar for deceptikon
0
133
Member Avatar for Vaspar

For communicating with a server, I'd probably start with a web service. The server exposes a WSDL which the not-keylogger connects to and calls methods on. The only issue with that in my experience is the relatively hard coded nature of web service references in the client. If the WSDL …

Member Avatar for deceptikon
0
204
Member Avatar for nitin1

10 in binary or 10 in decimal? In binary 10 is 2, which gives you the [ASCII value](http://www.asciitable.com/) for the control character STX. Really all you need to do is get the integer value and then treat it like a character. To be strictly correct with 7-bit ASCII, make sure …

Member Avatar for nitin1
0
540
Member Avatar for dspjm

Well, the specific syntax you posted is a [GCC extension](http://gcc.gnu.org/onlinedocs/gcc/Variadic-Macros.html). but C99 *does* support variadic macros with more or less the same syntax as variadic functions. The big difference is how the argument list is retrieved (`__VA_ARGS__` for C99 and `args` for GNU).

Member Avatar for dspjm
0
123
Member Avatar for rithish

The concept is sound, but super inefficient due to the overhead of chasing pointers.

Member Avatar for deceptikon
0
141
Member Avatar for cfresh

Technically it's not a constraint violation so the compiler isn't required to produce a diagnostic message. At best you'd get a warning for a persnickety compiler. For example, Comeau gives me a warning under default settings, but Pelles C doesn't except for the highest warning level. Visual C++ 2010 doesn't …

Member Avatar for deceptikon
0
153
Member Avatar for Daniel BE

I'm not sure I understand the question. You can reset your password from the login popup, and the only way that wouldn't work is if you no longer have access to the email address assigned to the account. Nevermind, I see what happened now. As the warnings clearly state when …

Member Avatar for Daniel BE
0
261
Member Avatar for Mike Askew
Member Avatar for Ancient Dragon
0
164
Member Avatar for lorens5
Member Avatar for arslan.haroon

This is an excercise for you to learn. Being given the code only teaches you to beg for freebies. It's not a difficult exercise, please make an honest attempt and then if you have problems feel free to ask about them.

Member Avatar for hariskhank
0
106
Member Avatar for prathiyus

Dude, go read a book on C. You're asking for something so trivial that I can't imagine anything other than total ignorance as the cause. This forum is not for holding your hand and teaching you from scratch.

Member Avatar for Ancient Dragon
0
230
Member Avatar for katsmiley

The the result were the same, why would we have both %d and %c specifiers? If you use %d then the value of ch is interpreted as an integer and the value 23 is displayed. If you use %c then the value of ch is interpreted as a character and …

Member Avatar for Tumlee
0
323
Member Avatar for BigPaw

Are you asking what we snack on while coding, or what we eat in general? What I eat in general is mostly a healthy diet of whole foods. Staples include: * Tea * Coffee * Oatmeal * Peanut butter * Cheese * Chicken * Veggie burgers * Frozen Fruit * …

Member Avatar for deceptikon
0
199
Member Avatar for maraghuram

You're correct, in a manner of speaking. The problem is that you haven't told the recursive chain higher up that the desired leaf was deleted. What happens if by deleting a leaf, you've created a new leaf? And what happens if that occurs all the way up to and including …

Member Avatar for Gonbe
0
788
Member Avatar for nova4005

I thihnk a B.S. in computer science would look better on a resume than information technology.

Member Avatar for L7Sqr
0
214
Member Avatar for jjones41
Member Avatar for prathiyus

I don't understand the requirement. `n` already has the number of items, so to get the last index all that's necessary is to subtract 1 from `n`. Theres no need for a pointer that I can see.

Member Avatar for prathiyus
0
136
Member Avatar for mayank.dyl

> I think we just need to convey our message. Poor spelling can obscure the message. > here, many people are there who are not so good in english and don't spell correctly. Actually, I've found poor grammar to be more obtrusive than all but the most grievous of spelling …

Member Avatar for tech-ultrasonic
0
436
Member Avatar for MianJahanzaibYousaf

This is actually an amusing exercise, but if you can really *only* use one loop then you'll need to employ a trick of two that technically involves an implicit loop. Since you're essentially working with a 2D grid (ie. rows and columns) at least two loops are necessary to get …

Member Avatar for deceptikon
0
106
Member Avatar for poloblue

You try to print `size` from a static member function, but `size` isn't a static member. To access non-static members, you need an object, because that's where memory for non-static members is allocated.

Member Avatar for poloblue
0
2K
Member Avatar for php111

Both would be suitable. King's book is more highly regarded by experienced programmers, but having read both, I think as an absolute beginner you may prefer Prata's book.

Member Avatar for php111
0
759
Member Avatar for IAMADOG

Put simply, the point is to enforce a trailing semicolon on calls to the macro without losing the massive benefits of having the macro wrapped in its own scope.

Member Avatar for deceptikon
0
128
Member Avatar for naui95

> And why would you rely on a simple C function in a managed language? Because this thread was originally posted in the C forum and gerard probably didn't notice that the code was C#.

Member Avatar for JOSheaIV
0
271
Member Avatar for amishosh

For the decimal digits you can subtract '0' to get the numeric equivalent: '0' - '0' = 0 '1' - '0' = 1 '2' - '0' = 2 '3' - '0' = 3 '4' - '0' = 4 '5' - '0' = 5 '6' - '0' = 6 '7' - …

Member Avatar for deceptikon
0
195
Member Avatar for bikash barad

This is homework. What was *your* answer to the question? It has to do with how signed and unsigned types interact.

Member Avatar for amrita111
0
97
Member Avatar for chandnigandhi

Have you tried searching the forum? We regularly get people trying to install a Model T engine (Turbo C) in their 2012 Ferrari (modern Windows OS).

Member Avatar for Ancient Dragon
0
101
Member Avatar for katsmiley

> But here i have defined MAX one time only and it will get substitued by 5 before compilation begins.So which one is better? Neither. If you're comparing a constant with a constant then you should just strip away the test entirely because it's not dependent on runtime values, or …

Member Avatar for deceptikon
0
164
Member Avatar for gwolf1

Do you know anything about [hash tables](http://eternallyconfuzzled.com/tuts/datastructures/jsw_tut_hashtable.aspx)? That's the first step, as a hashmap as it's usually seen is really just a pretty interface over a hash table.

Member Avatar for deceptikon
0
575
Member Avatar for sachi059

If you know what the storage classes are and what they mean then it's fairly obvious that they're nonsensical when applied to function parameters. What semantics where you expecting?

Member Avatar for deceptikon
0
876

The End.