6,741 Posted Topics

Member Avatar for Tommoh

>But the author doesn't make this clear so I'm not sure. Your analysis looks good to me. >Then surely (memory[0xFFFD] << 8) will simple equal 00000000? Integral promotions are performed on both of the operands to the << operator, so that snippet would only be shifting away the relevant bits …

Member Avatar for Tommoh
0
171
Member Avatar for lancer56
Member Avatar for barronxxx
-1
128
Member Avatar for califguy

>Here's the doubt. You don't have a doubt, you have a question. To have a doubt means that you understand something, and subsequently disagree with it. A question, on the other hand, suggests incomplete understanding and a need or request for clarification. In some cases question can be used in …

Member Avatar for califguy
0
87
Member Avatar for princess_19

>I do not know how to start the program!! I always start with this: [code=cplusplus] #include <iostream> int main() { } [/code] >When it says "exponentially" then what formula should I use for the output? The description says to double approximately every 24 months. Using that as the baseline, you …

Member Avatar for Narue
0
146
Member Avatar for makubexiii

>in the underlined part, by greater value does it mean that A has greater value than B? strcmp compares each character in order and returns the result of the first two characters that don't match. It's equivalent to this implementation: [code=c] int jcmp ( const char *a, const char *b …

Member Avatar for makubexiii
0
1K
Member Avatar for rity
Member Avatar for Narue
-1
48
Member Avatar for clutchkiller

>Can anyone tell me if this video and course work is helpful at all? In my experience, video courses on programming are all crap.

Member Avatar for Ancient Dragon
0
155
Member Avatar for skabaw

Build it manually: [code=cplusplus] #include <iostream> #include <string> int main ( int argc, char *argv[] ) { std::string args; for ( int i = 0; i < argc; i++ ) { args += argv[i]; if ( i != argc - 1 ) args += ' '; } std::cout<< args <<'\n'; …

Member Avatar for Narue
0
71
Member Avatar for Demonisya

>#define p printf This is an extremely bad idea. If your teacher taught it to you, slap him for me. >clrscr(); This is a bad idea. Not only is it anti-social (by removing the output of other programs when run in a shared console), it unnecessarily destroys the portability of …

Member Avatar for Demonisya
0
116
Member Avatar for saiclone
Member Avatar for ashblynn02

Post the code you've completed. We don't care how much you beg, no proof of effort results in no help.

Member Avatar for ashblynn02
0
154
Member Avatar for AutoC

>Firstly, am I right? So far, yes. >I get Segmentation Fault. Did you allocate memory to the individual pointer or just the array? There are two steps here, first you allocate memory for the pointers in the dynamic array, then you allocate memory to each pointer to hold a node …

Member Avatar for Narue
0
97
Member Avatar for rkumaram

You have three distinct problems. 1) You need to use square brackets instead of parentheses when dynamically allocating memory: [code=cplusplus] // Square brackets! name = new char[strlen ( foo ) + 1]; [/code] 2) You need to use the syntax for delete that matches the syntax for new: [code=cplusplus] base::~base() …

Member Avatar for rkumaram
0
113
Member Avatar for xxxa_u_r_axxx

You only perform the copying steps if the search string is found. Add a "not found" case where the line is copied as-is if the search string isn't located.

Member Avatar for Narue
0
146
Member Avatar for daviddoria

In other words, part of the file is ASCII and the rest is binary data. >Can I do the above (ie. read with getline() and then read binary? Sure, but you may encounter problems with newline conversion. >How would I read 12 bits at a time (for a 12-bit color …

Member Avatar for Narue
0
125
Member Avatar for xxxa_u_r_axxx

That's a good start, but you aren't taking into account the rest of the data on the line. What you need to do is a string replacement, which involves copying everything before the search string to a buffer, append the replacement string, then everything after the search string. Depending on …

Member Avatar for iamthwee
0
100
Member Avatar for sivaslieko++

>I need to store all messages during the chat sessions among users. Is this some ad hoc chat program that doesn't support logging?

Member Avatar for LizR
0
164
Member Avatar for BeyondTheEye

>Still doesn't recognize MessageBox() though.. I thought it didn't require any header files? You thought wrong. You need to make sure that windows.h is included and that you're linking to either user32.lib or user32.dll.

Member Avatar for Narue
0
267
Member Avatar for mostermand

>i was wondering how much i should use classes in C++. As often as you need them, obviously. In my experience, this question is born of ignorance. You don't understand OOP and classes well enough to know when to use them, so you try to turn it into some kind …

Member Avatar for mostermand
0
319
Member Avatar for didolouise

>Do anyone know if a someones privacy rights have been infringed if a >signed document has been scanned and uploaded onto a website at all? I'd say if a signature was required on the document, it falls under the category of potentially sensitive. >what would be a good way to …

Member Avatar for Narue
0
174
Member Avatar for Dannyo329

>Now it somehow skips straight to 'else', missing out the 'if' and the 'else if'...... That's because getch doesn't perform text conversions. It's a straight detection of scan codes from the console. This means that on systems (such as Windows) where a newline is two values before being converted to …

Member Avatar for Dannyo329
0
658
Member Avatar for john88

I'm not sure what you mean, but I'd guess that you don't know how to signal end-of-file from the command line, so the loop never ends. Hold down the ctrl key and press z (ctrl+z) if you're on Windows and d (ctrl+d) if you're on Unix or Linux.

Member Avatar for MelechM
0
123
Member Avatar for bricjames

Here's something to play with as a template: [code=cplusplus] #include <ios> #include <iostream> #include <limits> #include <string> using namespace std; int main() { bool done = false; do { int value; cout<<"Enter a number: "; if ( !( cin>> value ) ) break; cout<<"You entered "<< value <<'\n'; // Clean …

Member Avatar for MelechM
0
123
Member Avatar for skatamatic

>I'm trying to prove to my teacher that Div and Mod isn't always the best way to solve things. I find it humorous that you seem to think "fastest" and "best" are synonymous. >You're all welcome to show your instructors this =) Oh, I will indeed. It's a very amusing …

Member Avatar for skatamatic
0
3K
Member Avatar for poulier12

>can any one make me a computer operating system Sure, [URL="http://www.linux.org/"]go here[/URL] and help yourself.

Member Avatar for Lightninghawk
0
57
Member Avatar for asifjavaid

Do you actually want to convert to little endian or is this some kind of homework project? Because converting to hexadecimal doesn't enter into the picture if you're working with the bytes. The representation only matters for display and such.

Member Avatar for Narue
0
4K
Member Avatar for nuceyneky
Member Avatar for iamthwee

>How would I generate a csv file The first thing that comes to mind is a sparse matrix to store the coordinates and value. Then when you iterate through the matrix, you can fill the gaps with empty fields and blank lines as appropriate, and really all you need to …

Member Avatar for iamthwee
0
261
Member Avatar for Jayeeta Mitra
Re: List

You know what [B]I[/B] need urgently? Hope for the future in the form of a beginner who actually does his or her own homework without begging for freebies. I actually don't mind giving freebies to people like that because they use the code wisely and for everyone's benefit.

Member Avatar for Nick Evan
0
85
Member Avatar for grisha83

>Could you please explain to me how to write the >user defined functions with multiple arguments? There are three patterns for function parameters. First is a function with no parameters: [code=cplusplus] void foo(); [/code] No parameters is described in code using parentheses where there's nothing between them. Next is a …

Member Avatar for grisha83
0
149
Member Avatar for Tony0930

Weak or unpolished graphics can distract from the gameplay in many cases. Likewise, attention to detail in the graphics can improve gameplay by drawing the player in and offering more variety in how elements are displayed. Compare shooting at red blobs with a frowny face to shooting at a noticeably …

Member Avatar for sciwizeh
0
163
Member Avatar for ryukifaiz

>The due date is tomorrow And you were given the assignment today, I'm sure. :icon_rolleyes: You seem like yet another boob who screwed around when he should have been working and expects us to provide a free lunch. You want help? Show us your code. If it looks like you've …

Member Avatar for Alex Edwards
0
89
Member Avatar for Jayeeta Mitra

How to do your own work before it becomes urgent? Well, clearly you don't know the answer to that one. :icon_rolleyes:

Member Avatar for Narue
0
62
Member Avatar for vibgyor

>I am wondering what extra expertise is needed to apply for Job postings >which says 'Exp in Banking' or 'Exp in Financial industry is a must' ? Basically, you're expected to have worked in that industry before. You'll be asked to do things that require knowledge of the concepts, terminology, …

Member Avatar for Narue
0
117
Member Avatar for acoxia

>#include <iomanip> // what is this library used for The <iomanip> header essentially declares stream manipulators that take an argument. This is as opposed to those stream manipulators that don't take a special argument and are declared in the <ios> header. The code you posted is actually incorrect in that …

Member Avatar for acoxia
1
86
Member Avatar for mksakeesh
Member Avatar for Ezzaral

>I was wondering if a mechanism like the "Flag Bad Post" >option on forum posts would be useful on the PM interface. I'm torn on this. On the one hand it's a good idea. On the other, we don't have the rule framework in place for dealing with problematic PMs. …

Member Avatar for Ezzaral
0
198
Member Avatar for winky

>I believe it wants us to write a program that we input a number, and we >have to be able to output how many digits are output to a particular base. That's trivial too. numdigits as it stands is specific to decimal only because it uses literal 10's in the …

Member Avatar for Narue
0
100
Member Avatar for hpr

>It's because I'm going to generate poisson random deviates for parallel-programming >and I need it to be seed-less to ensure concurrent execution. No, you just need the seeding mechanism to work properly for your concurrent processes. However, you didn't specify what "work properly" means for you. Do you want each …

Member Avatar for Narue
0
207
Member Avatar for dirtyhiphophead

>what facet of the IT world would you advise a newbie like me to venture in The one you find most interesting. Or if you have no preference, get a taste of them all until you do. >or which do you think is easiest? Of those listed I think networking …

Member Avatar for peter_budo
0
91
Member Avatar for dmlandrum

>Is C++ going to barf on that Possibly. It depends on whether A contains data members and if having multiple copies of the A subobject within a C object would cause problems in your code. Virtual inheritance was introduced to alleviate these kinds of problems.

Member Avatar for grumpier
0
93
Member Avatar for KraMer

>I want the discussion to be related to my requirements, please. You didn't specify any requirements that can't be achieved with either language. Pick the one you're most comfortable with.

Member Avatar for KraMer
0
199
Member Avatar for Ayu1004

I'll go out on a limb and guess that you're using Visual C++ 6.0, where your problem is a [url=http://support.microsoft.com/kb/240015]known bug[/url].

Member Avatar for Ayu1004
0
181
Member Avatar for ulrik04

Command line arguments are passed as parameters to main. The first parameter gives you the number of arguments (including the program name) and the second gives you an array of strings containing the actual arguments: [code=cplusplus] #include <iostream> int main ( int argc, char *argv[] ) { // The first …

Member Avatar for ulrik04
0
279
Member Avatar for olsoul_41

>no i cant. So what you're saying is that you're unwilling or incapable of searching Daniweb, Google, or any book on C. This is a dreadfully simple problem and the question is asked quite frequently. >can you pls help me? No, you're beyond help. If you can't be bothered to …

Member Avatar for Narue
0
137
Member Avatar for BioTeq

>printf("i_in: %d \n j_in: %d \n Value: %lg \n", &i_in,&j_in,&p_in); You're printing the value of the address of each of those variables. Remove the address-of operator.

Member Avatar for Narue
0
111
Member Avatar for bamabambhole01
Member Avatar for Alex Edwards

>flush is a function so you need to use () cout.flush() std::flush is a manipulator, that part was fine. >Try this macro That still won't work as the construction is illegal. >What I'd like is a way to print the information at compile-time. That brings up the question of where …

Member Avatar for Narue
0
3K
Member Avatar for dexter1984

>I can't get my program working when I put !finBinary.eof(). Put it where? Why don't you post the code you're asking a question about so we don't have to guess? >Google'ed and found out that binary files have some characters similiar to eof? That's a different eof. There's the physical …

Member Avatar for Narue
0
141
Member Avatar for Poab9200

>I Believe my problem is that the string is in a "private" object That's the way it should be. I've had to smack co-workers on the head before for solving this problem by making those data members public. :icon_rolleyes: Anyway, you can access the data from another form through properties …

Member Avatar for Poab9200
0
119

The End.