Search Results

Showing results 1 to 40 of 1000
Search took 0.14 seconds.
Search: Posts Made By: Salem
Forum: C Sep 18th, 2009
Replies: 2
Views: 273
Posted By Salem
Standard C doesn't allow you to declare variables in the middle of statement blocks.
Forum: C++ Sep 18th, 2009
Replies: 4
Views: 307
Posted By Salem
OK, so start by calculating the input ranges, then you can create scale factors to map the input range to the output range.
Forum: C++ Sep 18th, 2009
Replies: 4
Views: 307
Posted By Salem
Do you want to?

- clip extreme values, say if ( x > 25 ) x = 25 ?
- scale the graph (max=100), so px = x * 25 / max
Forum: C++ Sep 18th, 2009
Replies: 5
Views: 277
Posted By Salem
Short answer - don't mix cin and getline.
They don't play well together.
Plenty of past posts and answers for this problem, look around.
Forum: C Sep 18th, 2009
Replies: 3
Views: 518
Posted By Salem
http://www.daniweb.com/forums/thread223648.html
The amount of effort it took just to reverse a string makes this near impossible for you.

You need some more intermediate steps if you actually...
Forum: C Sep 17th, 2009
Replies: 20
Views: 710
Posted By Salem
Post your code!
Did you initialise i ?
Forum: C Sep 17th, 2009
Replies: 20
Views: 710
Posted By Salem
result[numchars++] = basechars[r];

When you're done, print from numchars-1 back down to 0 (one char at a time).
Forum: Computer Science Sep 17th, 2009
Replies: 3
crm
Views: 332
Posted By Salem
http://www.daniweb.com/forums/announcement14-2.html

http://www.catb.org/~esr/faqs/smart-questions.html#urgent
Forum: C++ Sep 17th, 2009
Replies: 5
Views: 281
Posted By Salem
Pure dumb luck is all.

Your cout statement basically filled that part of the stack with a value which was harmless enough (maybe even the right answer).

Taking out the cout statement, that part...
Forum: C Sep 17th, 2009
Replies: 2
Views: 360
Posted By Salem
> typedef struct queue_type *Queue;
This should come AFTER your actual struct declaration.
Forum: C Sep 17th, 2009
Replies: 20
Views: 710
Posted By Salem
> basechars[r]
You're printing them, not storing them!
Forum: C++ Sep 17th, 2009
Replies: 5
Views: 281
Posted By Salem
smallest = PRIORITY[nc[0].row][nc[0].col];

for ( int i = 1; i < cnt; i++ )

If count is 1, bestindex is garbage.
Forum: C Sep 17th, 2009
Replies: 5
Views: 313
Posted By Salem
Well writing it on Linux using g++ would be a real test of your skill at writing portable software that will compile on ANY compiler.
Forum: C Sep 17th, 2009
Replies: 20
Views: 710
Posted By Salem
Store each char in another array, then print it out backwards?
Forum: C++ Sep 17th, 2009
Replies: 1
Views: 324
Posted By Salem
Ignore this, reposted here with tags
http://www.daniweb.com/forums/thread223821.html
Forum: Java Sep 17th, 2009
Replies: 4
Views: 277
Posted By Salem
> the most complicated program ive made is something that converts hexa to octa and all.
You've mastered hopscotch on the paving slabs, and now you want to try and leap across the Grand Canyon.
...
Forum: C++ Sep 17th, 2009
Replies: 5
Views: 281
Posted By Salem
There's a memory overwrite bug in your code somewhere (most likely anyway).

Without seeing the whole code, we're not going to figure anything out staring at those 3 lines.
Forum: C Sep 17th, 2009
Replies: 20
Views: 710
Posted By Salem
Well it's good for bases < 10

char basechars[] = "0123456789";

and
printf("%c", basechars[r] );
Forum: Shell Scripting Sep 17th, 2009
Replies: 4
Views: 459
Posted By Salem
> Now I want a shell script to automate this process.
Give us an idea of the kinds of repetitive commands you type in (and as skanke points out - which machine you type them on).

Perhaps then,...
Forum: C Sep 17th, 2009
Replies: 8
Views: 240
Posted By Salem
More cross-forum spamming
http://cboard.cprogramming.com/c-programming/119681-help-c-code.html

Ever feel like you're just wasting effort reading and answering the SAME question over and over...
Forum: C Sep 17th, 2009
Replies: 5
Views: 313
Posted By Salem
> I use only linux and I am unable find the compiler.
And what are you going to do with the executable when you've compiled your code?
Forum: Troubleshooting Dead Machines Sep 17th, 2009
Replies: 2
Views: 364
Posted By Salem
http://en.wikipedia.org/wiki/Non-maskable_interrupt

> Devices (Bus:Dev:Func) with SERR set at the time of the NMI:01:1C:01"
Depending on your BIOS (it may also be in windows device manager...
Forum: C++ Sep 17th, 2009
Replies: 1
Views: 373
Posted By Salem
http://cboard.cprogramming.com/cplusplus-programming/119676-need-help-compiling-vcplusplus-6-project-dev-cplusplus-4-9-9-2-a.html

and
http://www.daniweb.com/forums/thread223732.html
Forum: C++ Sep 17th, 2009
Replies: 2
Views: 278
Posted By Salem
Tutorial series.
http://www.adrianxw.dk/SoftwareSite/Consoles/Consoles1.html
Forum: C Sep 17th, 2009
Replies: 5
Views: 285
Posted By Salem
char *words[n];
words[0] = wordlist[0];

And so on.
Forum: C++ Sep 17th, 2009
Replies: 5
Views: 212
Posted By Salem
http://www.codeblocks.org/downloads
Forum: C Sep 17th, 2009
Replies: 20
Views: 710
Posted By Salem
> That is how I get the binary.
That's how you do it for every other base as well.
Forum: C Sep 17th, 2009
Replies: 2
Views: 406
Posted By Salem
16 replies over here -> http://cboard.cprogramming.com/c-programming/119668-circular-buffer.html

In other news -> http://www.catb.org/~esr/faqs/smart-questions.html#forum

And finally, the...
Forum: C++ Sep 16th, 2009
Replies: 4
Views: 232
Posted By Salem
Read the manual - it's good practice for the future.
Forum: C++ Sep 16th, 2009
Replies: 4
Views: 232
Posted By Salem
Try
volatile int variable;

Even then, you should really use proper synchronisation.


If the compiler sees

int variable = 0;
while (variable == 0)
Forum: C++ Sep 16th, 2009
Replies: 6
Views: 269
Posted By Salem
a) Your "cd" command only lasts as long as the sub-process does (and it only affects the sub-process). If you really want to change the directory in this process, you need to use the chdir() API...
Forum: C++ Sep 16th, 2009
Replies: 2
Views: 169
Posted By Salem
http://www.daniweb.com/forums/thread223471.html
Patience, don't spam the board in a panic.
Forum: Perl Sep 16th, 2009
Replies: 3
Views: 511
Posted By Salem
Generate 1 digit, in a loop which runs 8 times.
Forum: C++ Sep 16th, 2009
Replies: 8
Views: 399
Posted By Salem
Microsoft have their own typically bastardised version
http://msdn.microsoft.com/en-us/library/edze9h7e%28VS.71%29.aspx
Forum: C Sep 16th, 2009
Replies: 5
Views: 285
Posted By Salem
Sure, but that would take up more memory.
You would need to store an array of char* somewhere.
Forum: C Sep 16th, 2009
Replies: 4
Views: 236
Posted By Salem
http://cboard.cprogramming.com/c-programming/119649-malloc-why.html
Forum: C++ Sep 16th, 2009
Replies: 4
Views: 324
Posted By Salem
pow (23, 2)
You're passing two integers.

> 'pow(int, int)' is ambiguous
two integers is confusing....

> double std::pow(double, int)
A variety of combinations involving floating point types...
Forum: C Sep 16th, 2009
Replies: 5
Views: 285
Posted By Salem
A pointer to a 2D array is not a **
http://www.daniweb.com/forums/post859293.html#post859293

Use the typedef approach if you want to keep your sanity ;)
Forum: C++ Sep 16th, 2009
Replies: 2
Views: 182
Posted By Salem
File permissions are platform specific, so you only get access to them using platform specific APIs.
Forum: C++ Sep 16th, 2009
Replies: 4
Views: 324
Posted By Salem
Taking a stab at guessing line 98

VoltageGain = double pow ((275 / sqrt (pow (23, 2) + 0.5 * pow (f, 2))), n);

What does double do here?
Showing results 1 to 40 of 1000

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC