5,237 Posted Topics

Member Avatar for FreakNFlow
Member Avatar for Salem
0
267
Member Avatar for seancoder

> Last edited by Nick Evan; 2 Hours Ago at 14:06. Reason: Added code-tags. Time to stop apologizing and start learning how to use them Shame it still looks an awful mess then ;) In other news... [url]http://forums.devshed.com/c-programming-42/please-help-679306.html[/url]

Member Avatar for Salem
0
114
Member Avatar for senthil08

Of course, but it helps if you've learnt to [URL="http://www.daniweb.com/forums/thread78060.html"]read [/URL]to start with :icon_rolleyes:

Member Avatar for Salem
0
30
Member Avatar for bd338

A virtual machine perhaps? [url]http://en.wikipedia.org/wiki/Dosbox[/url] There are plenty about, one should suit your purpose.

Member Avatar for bd338
0
150
Member Avatar for adcodingmaster

> But can you please give me any other idea which is more involved and a bit high in degree of difficulty? And thus the Goldilocks problem is revealed, and why it is futile to ever attempt getting involved in "plz suggest a project" threads. Any answer we come up …

Member Avatar for adcodingmaster
0
209
Member Avatar for zacory

Well what kind of output did you generate? Was it a COM file or an EXE file? What memory model? probably some other questions I can't be bothered to think about at the moment.... > Can anybody shed some light on the situation? [URL="http://www.catb.org/~esr/faqs/smart-questions.html#prune"]Sure, no problemo[/URL]

Member Avatar for Salem
0
77
Member Avatar for kavithabhaskar

> if (s[i] == 'a'||'A'||'e'||'E'||'i'||'I'||'o'||'O'||'u'||'U') You need to say [ICODE]if ( s[i] == 'a' || s[i] == 'A' ||[/ICODE] I'm sure you get the idea.

Member Avatar for Salem
0
339
Member Avatar for igodspeed

> I am trying to convert this C code to C++. So rewrite it then. What you have at the moment is C/C++ road-kill. If you really want to make a good C++ program out of this, then you would be using [ICODE]std::string[/ICODE] in place of all those char arrays, …

Member Avatar for Salem
0
478
Member Avatar for macdougc

So stop wasting your time and use a std::string instead. > Does anyone know why this is happening? How many char* pointers do you actually ALLOCATE? Is it four?

Member Avatar for Salem
0
159
Member Avatar for merse

[url]http://sourceforge.net/apps/mediawiki/cpwiki/index.php?title=Feof[/url] feof() is a state - of a past event, not a prediction of a future event. You need to look at the result returned by the function actually reading the file to determine the success or otherwise.

Member Avatar for Salem
0
87
Member Avatar for doddware

[ICODE]p_bIsolated != 0[/ICODE] would seem to be a lot less obscure, whilst meaning about the same thing to the compiler.

Member Avatar for Salem
0
185
Member Avatar for priyaaaaaa

We need you to read this: [url]http://www.daniweb.com/forums/announcement14-2.html[/url] That means actually read it, don't simulate reading it.

Member Avatar for jerald45
0
104
Member Avatar for tquiva

First, you need a better approach to indentation. [code=c] /* File: account.c * * Date: February 2, 2010 */ /* This program calculates the accumulated value of a given initial investment and annual interest, given the options of either annual, monthly, or daily * compounding */ #include <stdio.h> /* Function …

Member Avatar for WaltP
0
120
Member Avatar for wtvrinc

Well for 10 lines of code, the indentation sucks. Is the rest of your code an unreadable mess? Do you get any warnings when you compile? [code] $ gcc -W -Wall -O2 -c foo.c foo.c:5:14: warning: multi-character character constant foo.c: In function ‘error’: foo.c:5: warning: comparison is always true due …

Member Avatar for wtvrinc
0
113
Member Avatar for isralruval

[code] $ g++ -W -Wall -O2 -c foo.cpp foo.cpp: In function ‘void rotateEncrypt(std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, int)’: foo.cpp:21: warning: suggest braces around [COLOR="Red"][B]empty body[/B][/COLOR] in an ‘if’ statement [/code] Of course, you could have …

Member Avatar for Salem
0
131
Member Avatar for ShortYute

A better question is what of any use are you going to learn from this teacher stuck in the stone age? You already seem to know more than they do. All those ifdef's are messy!!! [code] // screen.h void ColorPrint (const int ColTxtnum,const char *text); // screen_borland.c #include <conio.h> #include …

Member Avatar for Salem
0
182
Member Avatar for lizardc4

+18? You're not even close! [url]http://www.tomshardware.com/reviews/5-ghz-project,731.html[/url] However, one core stuck at a specific temperature doesn't look good. Can you see it doing things in task manager -> performance (select 1 graph per CPU)?

Member Avatar for crunchie
0
229
Member Avatar for nola_Coder
Member Avatar for fplgenius

Or, since you appear to be using C++, use std::getline and std::string instead of those messy C-style char arrays.

Member Avatar for NathanOliver
0
92
Member Avatar for tulip6
Member Avatar for TECHNICAL GIRL
0
290
Member Avatar for cool1_best1

Faster than you can read this, that's for sure. [url]http://www.daniweb.com/forums/announcement8-2.html[/url]

Member Avatar for mitrmkar
0
155
Member Avatar for clutchkiller

> MessageBox(NULL, (LPCTSTR)"Test1", (LPCTSTR)"Test1", MB_OK); Indiscriminate casting to get the compiler to STFU is a common problem. Just because you muffled the compiler doesn't make your code good. Take out the casts, then pay really close attention to the error messages. [url]http://msdn.microsoft.com/en-us/library/c426s321%28VS.71%29.aspx[/url]

Member Avatar for Salem
0
111
Member Avatar for #define
Member Avatar for paddy8788
Member Avatar for Kakespade

[url]http://sourceforge.net/apps/mediawiki/cpwiki/index.php?title=Pause_console[/url]

Member Avatar for NathanOliver
1
141
Member Avatar for thakur.ravi26

Posting on the C forum might be a good start. As would posting more than "help" as the body of your text.

Member Avatar for Salem
0
191
Member Avatar for OzY360
Member Avatar for SCoder1
Member Avatar for Salem
0
60
Member Avatar for bryanwheeler1

[url]http://en.wikipedia.org/wiki/Laser_printer[/url] [url]http://en.wikipedia.org/wiki/Inkjet_printer[/url] > Which one is better among this two? Well that depends on your definition of better. Depending on what you value, "up front cost" and "cartridge cost" may give you different answers. Only you know what your priorities are... > Can any one help me? [URL="http://www.catb.org/~esr/faqs/smart-questions.html#prune"]Maybe[/URL]

Member Avatar for MASTERFANG786
0
78
Member Avatar for MrYrm

Or not even use a regex at all. The key here is make a decent design to begin with, then you should be able to swap in and out different implementation ideas later on without having to rewrite the whole thing. Use whatever you're most comfortable with, just so you …

Member Avatar for MrYrm
0
83
Member Avatar for moshe12007

More cross-border postage.... [url]http://cboard.cprogramming.com/c-programming/123692-ports-c-lanuage-microsoft-visual-cplusplus.html[/url]

Member Avatar for moshe12007
-1
61
Member Avatar for mr. bean

Did you tell the linker - where to find the axutil library - to actually use the axutil library. The #include in your source code just tells the compiler that something exists (like say cout). But you also need a library for the actual implementation, and that's where the linker …

Member Avatar for mr. bean
0
1K
Member Avatar for KolosoK

It's a pretty sure thing that you're looking at the effect rather than the cause. Something else is probably trashing memory. Here is just where you first notice there is a problem. In a correct program, there is no apparent difference between debug and release (except speed). That you are …

Member Avatar for hllsen
0
198
Member Avatar for moein_soltani

Well right at the start Huffman::Huffman end is uninitialised. Then later on... [CODE] long begin,end; begin = output.tellg(); output.seekg (0, ios::end); end = output.tellg(); [/CODE] This local variable shadows your member variable, and you're still out of luck.

Member Avatar for moein_soltani
0
2K
Member Avatar for aceswildab1
Member Avatar for Lumi4real
0
305
Member Avatar for yila

Well you could try indenting your code. The last return 0; seems WAY WAY out of place...

Member Avatar for WaltP
0
179
Member Avatar for codrguy
Member Avatar for Linux777

Just use the find command - this is bread and butter for find. [code] $ find work -daystart -mtime -1 -size +2000c -ls 327592 4 drwxr-xr-x 2 forum forum 4096 Feb 17 16:18 work 327419 12 -rwxr-xr-x 1 forum forum 9339 Feb 17 16:18 work/a.out $ find work -daystart -mtime …

Member Avatar for Linux777
0
97
Member Avatar for knshn

You need to strip the newline off the end - did you notice the line break in the invalid option? Try [ICODE]str = strtok(NULL, " \n");[/ICODE]

Member Avatar for knshn
0
397
Member Avatar for VernonDozier

[url]http://www.opengroup.org/onlinepubs/009695399/functions/fdopen.html[/url] Use this to associate a file descriptor with a stream.

Member Avatar for VernonDozier
0
141
Member Avatar for pala2222

You're still writing bits, even if you write a file. Also, you can't just change one bit of a disk. The minimum addressable amount is typically 512 bytes (at the disk level). The file system usually aggregates these into single units called clusters - who's size can be anything from …

Member Avatar for pala2222
0
252
Member Avatar for johndoe444

scanf() is hard to use at the best of times. %c just makes it horrible in the extreme. Any random space on the input will screw you up. [ICODE]fgets( buff, sizeof buff, stdin ); sscanf( buff, "%c%d", &myChar, &myInt );[/ICODE]

Member Avatar for WaltP
0
2K
Member Avatar for dkoukou
Member Avatar for chinnaedu

Well why aren't YOU looking around the VLC website, the VLC code base and the VLC forums, instead of trying to get us to do your reading for you. We could spend hours or days trying to figure out what you want, only for you to dismiss it in a …

Member Avatar for chinnaedu
0
115
Member Avatar for wellealb

According to [URL="http://www.hkinventory.com/p/d/216TQA6AVA12FG.htm"]this site[/URL], the package is a [URL="http://en.wikipedia.org/wiki/Ball_grid_array"]Ball_grid_array(BGA)[/URL] Removing the old one will be hard. Getting the new one properly attached will be harder still - one screwup will likely end up frying some other stuff as well. Personally, I would cut my loss and sell what is usable …

Member Avatar for wellealb
0
195
Member Avatar for yona

> what's mean #include in c language [URL="http://www.cppreference.com/wiki/preprocessor/include"]#include <std_google_search.h>[/URL] You really need to watch the post dates, before you leap onto the end of any existing thread, based solely on the similarity with your own question.

Member Avatar for Salem
-2
30
Member Avatar for yila

[url]http://sourceforge.net/apps/mediawiki/cpwiki/index.php?title=Indentation[/url] Your code is awful to look at. While you're there, look up void main as well.

Member Avatar for yila
0
162
Member Avatar for adrawat

> Is there a more efficient way 2 do it? Well there are no simple ways of doing it more efficiently. Also, if your input file contains no characters, how many characters are you writing to the output file?

Member Avatar for adrawat
0
399
Member Avatar for MrYrm

But a recursive function in C++ would be no different to a recursive function in Java. There is no C++ magic here, almost every language can manage recursion. But if you don't understand the need for a stop condition (as Dave points out in post #4), then you're stuck anyway. …

Member Avatar for Stefano Mtangoo
0
122
Member Avatar for mebob

#IND is for indefinite. You may also see #NAN and #INF from time to time as well. All basically mean the same thing, and that is your calculations were way off (possibly the result of garbage data). Here's a nice short intro to all the different things floats can represent. …

Member Avatar for vmanes
0
440

The End.