3,183 Posted Topics

Member Avatar for NunsBeachSurfer

That totals to 5,978,160 bytes (assuming 8-byte `double`). Not horrible, but something to think about, especially if you can devise a way to avoid keeping all of those values in memory if you don't really need them. Now to answer your question: 1. Yes. 2. God yes. Doing this manually …

Member Avatar for NunsBeachSurfer
0
152
Member Avatar for sternone
Member Avatar for happygeek

> Makes a change from when it was all the C/C++ people :) I'm curious to see what kind of attitude shift will result from this. The C/C++ folks can be a nasty and unrelenting bunch (*\*cough\**Narue*\*cough\**). ;)

Member Avatar for Ezzaral
0
189
Member Avatar for Roebuc

I work for a consulting firm rather than freelance, but technically the work is still contract. So.... 1. We charge the same base hourly rate across the board, with business and after hours charges for support. 2. Work is work. As long as you can show a steady stream of …

Member Avatar for Roebuc
0
253
Member Avatar for turkgames

Rather than list out everything I did, I'll just post the code: #include <stdio.h> #include <stdlib.h> typedef struct tree { int data; struct tree *right, *left; } TREE; TREE *insert(TREE *, int); TREE *findmax(TREE *); void order(TREE *); void structure(TREE *root, int depth); int main() { TREE *root = NULL; …

Member Avatar for turkgames
0
182
Member Avatar for tyggagucci

Reading a delimited file can be super easy or somewhat tricky depending on the format. If you're doing something super basic where the delimiter isn't allowed to be embedded in field data, it's almost trivial: #include <fstream> #include <iostream> #include <iterator> #include <sstream> #include <string> #include <vector> namespace file_management { …

Member Avatar for deceptikon
0
260
Member Avatar for Sky Diploma

Tested, confirmed, fixed, and pushed to staging. It should make it to production today or tomorrow. Thanks for the report. :)

Member Avatar for Dani
1
279
Member Avatar for DubyStev

But note that T** is *not* a compatible type with T[M][N], so a function expecting the former will not accept an object of the latter.

Member Avatar for mike_2000_17
0
241
Member Avatar for dippyes

> The problem I have with the funcion, is that I am unable to read the "Float" and "Double" type parameters Varargs are always promoted, so there's no such thing as a `float` type parameter. That's your biggest problem: instead of trying to extract an object of type `float`, you …

Member Avatar for deceptikon
0
134
Member Avatar for Nick Evan

I'm not sure the backslash is an "official" solution. Unfortunately I'm not in a place where I can peruse the code at the moment, but I don't recall any provisions in the parser for such a thing, so it may simply be an unintended feature that could potentially go away …

Member Avatar for deceptikon
0
233
Member Avatar for prasanna123

> Well.. m sorry to go against what u just said zeroliken, but it isnt undefined... Its how the prefix and postfix operators work.. Nope, it's definitely undefined because i is modified more than once between sequence points. The commas in a function call don't count as sequence points. > …

Member Avatar for Sokurenko
0
191
Member Avatar for mcjiwe

You're getting that error because pointers aren't magic. If you want a pointer to point to N bytes of memory, you *must* ensure yourself that the memory exists and assign the base address of that memory to the pointer. The specific problem here is that you're using uninitialized pointers as …

Member Avatar for mcjiwe
0
8K
Member Avatar for sidra 100

And now for the obligatory question: why do you think you need to clear the screen? There are only a handful of reasons where it makes sense outside of a GUI environment, and quite a few reasons why it's a bad idea in a textual environment (the kind of environment …

Member Avatar for adityatandon
0
214
Member Avatar for jeav12
Member Avatar for Chaky

> Being human that I am (I really, really am!) and having preferences and being overly-opinionated in every possible field, my answer to "What kind of device is IPad?" was "Crappy". Not that I find it crappy, I just generaly dislike mass-produced consumer items, but that doesn't matter.. what matters …

Member Avatar for dan2see
1
268
Member Avatar for Dean_williams

Posts are retained forever unless they break the rules and are subsequently deleted. As for how long it takes to get a response, it very much depends on the nature of the question and the forum. Some forums are very active while others are less so. If you don't get …

Member Avatar for Dean_williams
0
138
Member Avatar for darkagn

Not that we can tell. The over 200 with a huge portion being spambots was before migrating to the new system.

Member Avatar for PrimePackster
0
198
Member Avatar for Reverend Jim

Are these watched thread notifications or recommended thread notifications?

Member Avatar for Dani
0
194
Member Avatar for sesan2007

There are many here who can help you when you ask a specific question, but nobody will do your project for you.

Member Avatar for nitinmbhanu
0
214
Member Avatar for noscimo

void* p; // Create a pointer to void functionName(&p); // Pass its address to create a void** Note that a `void**` isn't generic like `void*`, so you can't pass the address of a `char*` or `int*` when `void**` is expected.

Member Avatar for deceptikon
0
162
Member Avatar for jonnyboy12

[QUOTE]This is C++? Not on any planet I am familiar with, and I have only been programming C++ for 20 years, professionally![/QUOTE] [URL="http://en.wikipedia.org/wiki/C%2B%2B/CLI"]C++/CLI[/URL], it's C++ extended to meet CLI requirements and fit into the .NET framework as a managed language.

Member Avatar for thines01
0
144
Member Avatar for Carolin

Cool story, bro. Am I correct in inferring that you don't want that to happen? Because you neglected to ask any kind of question.

Member Avatar for JGorard159
0
85
Member Avatar for nitinmbhanu
Member Avatar for tischn

The initialization is fine; the problem is a typo in your printf() calls. The closing paren is misplaced. Try this instead: printf("%d\n", p[0].var1); printf("%d\n", p[0].var2); printf("%d\n", p[0].var3); printf("%d\n", p[0].var4[0]); printf("%d\n", p[0].var5); printf("%d\n", p[0].var6);

Member Avatar for tischn
0
139
Member Avatar for kumarprashant

What kind of help do you want? Simply posting an assignment verbatim without any evidence of thought or effort on your part is against Daniweb's rules. But I'll give you the benefit of the doubt and kindly request that you ask a specific question and prove that you've made some …

Member Avatar for deceptikon
0
4K
Member Avatar for ~s.o.s~

After watching the first episode, Acchi Kocchi looks promising. I was kind of annoyed when Danshi Koukousei no Nichijou ended, so woot!

Member Avatar for ~s.o.s~
1
270
Member Avatar for claywin

> All errors are resolved and it runs, but as soon as it starts it says "main.exe has stopped working" and closes. That's what I'd call "doesn't run", given that it crashes immediately upon loading. What you want to do is run your program in a debugger so that execution …

Member Avatar for Labdabeta
0
1K
Member Avatar for hypernova

> In C, you must know what you are doing. Yes indeed. > fflush(stdin) // OR fpurge(stdin) on unix-like OS Oh, the irony. fflush() is specifically designed for output streams, and if you know what you're doing then you've probably heard that the C standard says calling fflush() on an …

Member Avatar for hypernova
0
302
Member Avatar for rashid_khan

So far everyone has been assuming you want 3 of 9 barcodes, which isn't necessarily a safe assumption. If 3 or 9 or another simple linear barcode symbology is acceptable then it can be as easy as adam_k suggested: barcode readers are usually USB and send translated results directly through …

Member Avatar for Jeff-Bennett
0
174
Member Avatar for riahc3

Article is a more generic term for the same things you're familiar with. Threads are articles, news stories are articles, white papers are articles, code snippets are articles, etc... Articles may also contain replies, which are post; this makes sense because Daniweb is a discussion community. ;) > and when …

Member Avatar for Airshow
0
303
Member Avatar for volscolts16

volscolts16 hasn't visited Daniweb for 2 years. You're not likely to get any answer in this thread.

Member Avatar for deceptikon
0
4K
Member Avatar for Junior999

I'm not sure I understand the requirements and they're not obvious from the code given. What should this calculator be doing?

Member Avatar for deceptikon
0
104
Member Avatar for luvrahul30

Could you be any more vague? The thing is I made a bet with a coworker that "I have to scan a file for things" isn't the worst possible question one could ask if one is expecting any kind of useful answer.

Member Avatar for deceptikon
0
120
Member Avatar for hwoarang69

Since the OP found the problem but didn't explain what happened for readers of this thread, allow me: int total[SIZE]; printf("%d",total); The %d specifier expects an integer value, yet an unadorned `total` is equivalent to `&total[0]`. Thus the argument tied to %d is a pointer to int rather than an …

Member Avatar for deceptikon
0
236
Member Avatar for MrEARTHSHAcKER

The default back-end for std::queue is std::deque, which grows and shrinks dynamically. std::queue is actually a form of adapter that sits on top of a data structure to provide a convenient interface. std::stack is the same way. std::deque is implemented in a somewhat confusing way, so you might consider studying …

Member Avatar for MrEARTHSHAcKER
0
247
Member Avatar for adityawkhare

C++ doesn't do graphical elements. You'll need to use a GUI library of some sort, though upgrading to a compiler that wasn't designed for MS-DOS would greatly facilitate your search for a working library..

Member Avatar for Ancient Dragon
0
571
Member Avatar for silvercats

![Context_b16187_25845991](/attachments/large/3/Context_b16187_25845991.jpg "Context_b16187_25845991")

Member Avatar for silvercats
0
120
Member Avatar for cppgangster

It's not much different from declaring a function at file scope: void some_function(); std::thread f() { return std::thread(some_function); } The difference between this and your example is the visibility of `some_function` in the file. When the declaration is at file scope, everything after the declaration in the file can see …

Member Avatar for deceptikon
0
179
Member Avatar for cyther

Um, triumphost...fscanf() is for input, cout is for *output*. You probably mean cin: std::cin >> student[x].name >> std::ws >> student[x].num; Unfortunately, cin doesn't try to match literal data, but literal whitespace in the *scanf() format string is a special case. It means "extract and ignore any amount or type of …

Member Avatar for cyther
0
160
Member Avatar for i-teq

Exhibit A: `CRobot** donut_population;` Exhibit B: `init_population(donut_population, pop_alpha, pop_beta)` Exhibit C: `void init_population(int** donut_population` The `donut_population` you pass is `CRobot**`, but init_population() expects `int**`.

Member Avatar for i-teq
0
383
Member Avatar for NitaB

Does the following not work? returnSeq.seqType = RNA; /* Initializing to RNA, for example */

Member Avatar for NitaB
0
127
Member Avatar for SCass2010

I don't see the benefit here, especially given the hoops you'd have to jump through to achieve the desired syntax. Is it possible? Yes. Is it worth it? Only if you can come up with a justification that amounts to more than saving two keystrokes (the angle brackets in this …

Member Avatar for mike_2000_17
0
2K
Member Avatar for pritaeas

Go ahead and click the button to add reputation, the difference between rep and a mere vote is the presence of a comment. In other words, if you leave the comment blank, it's just a vote even if it comes from the "Vote & Comment" button. And we'll look into …

Member Avatar for deceptikon
0
197
Member Avatar for pkfx

I'm assuming you're reading the entire input into a single string. You'll need to first break this string up into individual "words", or items separated by whitespace. Then each word will need to be converted to an integer and assigned to the array. For example: #include <iostream> #include <iterator> #include …

Member Avatar for deceptikon
0
108
Member Avatar for JorgeM

> i think the even bigger concern , is the ammount of useful and helpful posts that receive no voting at all, with or without rep. > > some of these people are just plain ungrateful :( Providing answers and help is a thankless job, to be sure. But that …

Member Avatar for JorgeM
0
499
Member Avatar for vibhaJ

You can tell by the number of replies, the most recent respondant name, and if thread subscriptions are turned on, you'll be notified by email as well. Unfortunately the recent activity icon isn't working quite as we'd like, but that's on the list of things to fix, so it's only …

Member Avatar for seosolutions84
0
157
Member Avatar for dshiells

You need to build the integer value manually using its component bytes: #include <iostream> #include <Windows.h> using namespace std; int main() { BYTE freeBlocks[4] = {0x00, 0x05, 0x7d, 0xa4}; DWORD displayValue = 0; displayValue = freeBlocks[3]; displayValue |= freeBlocks[2] << 8; displayValue |= freeBlocks[1] << 16; displayValue |= freeBlocks[0] << …

Member Avatar for dshiells
0
2K
Member Avatar for hay123

The accepted way to terminate your account is to remove any personal information from your edit profile page, log out, and never log back in under that name. Naturally this doesn't actually remove the account (which we retain for anti-spam law conformance) or any of your posts (which we retain …

Member Avatar for deceptikon
0
78
Member Avatar for NyQii

Those errors coming from the use of a library suggest that you aren't properly linking to it. Did you make sure to link to the .lib/.dll file for OpenGL, or just include headers?

Member Avatar for NyQii
0
225
Member Avatar for Brenda_Bawa

> Why would one be permanently linked to a website? Because we send bulk emails and need to prove that everyone we've sent an email to has opted into it by registering. It's equally effective to remove all personal information from your profile (some of which, such as changing your …

Member Avatar for deceptikon
0
277

The End.