5,237 Posted Topics

Member Avatar for kbkorlahalli
Member Avatar for balena

If you've got variable types, then write out some kind of 'id' first, so that you know what kind of object is next in the file. Similarly for variable lengths, write out the length, then the data.

Member Avatar for Salem
0
138
Member Avatar for mikedd

You also forgot to read these as well [url]http://www.daniweb.com/forums/announcement118-2.html[/url] [url]http://www.daniweb.com/forums/thread78060.html[/url] Now, which bit are you really stuck on?

Member Avatar for Salem
-1
163
Member Avatar for basukinjal

> My Question is why is there an extra gap of 3 in the memory? Because things like int or floats are more efficiently accessed (or even only possibly accessible) if they're on say a 4 byte boundary (or even 8 bytes for doubles on some machines).

Member Avatar for bradd
0
99
Member Avatar for Eilya
Member Avatar for uan_Blr

Dead easy in awk (Perl's baby sibling) Assuming these are comma separated value files, [ICODE]awk -F, '{ print $1 "," $6-$10 }' file.txt[/ICODE]

Member Avatar for uan_Blr
0
519
Member Avatar for rumencho

4. As option 1, but edit the tasm.cfg file (or whatever it's called) which sets environment variables for LIB and INCLUDE. These are the default places it searches for things. Simply add the 3rd party directories and you can use them for anything without any further (or extra) effort.

Member Avatar for Salem
0
110
Member Avatar for raul15791

> Data = new string[size]; Not only does this leak memory, it also loses all your previous input. You need a way of expanding your array of lines. Have you considered that std::vector would be ideal for this. Put the cin.ignore directly after any I/O functions which leave newlines behind.

Member Avatar for raul15791
0
118
Member Avatar for dexter1984

I see an = where there should be an == What compiler, and what warning level are you at?

Member Avatar for Salem
0
101
Member Avatar for welles

> Can anyone please tell me where is the printed output go? In this example, it would go to the console. In debug, it would expand to printf ("This is the debug output\n"); It would be pretty easy to replace that with say [ICODE]void myLoggingPrintf( const char *fmt, ... );[/ICODE] …

Member Avatar for Salem
0
193
Member Avatar for mashimaro

> 1) I have a list of logins, seperated by a space (in a logins.txt file, like so: login1 login2 login3). All on one line? Or like login1 login2 login3 login5 login5 You could try this [code] for i in `cat logins.txt`; do grep $i online.txt; done [/code] For the …

Member Avatar for Salem
0
113
Member Avatar for Duki

What if one of the laptops was on your desk, and the other laptop was on your robot? Something your "dual core" processor could never do.

Member Avatar for Salem
0
276
Member Avatar for Kob0724

What version(s) of QT are on the machines which work? Why do the same directories repeat over and over in the compiler command line? If you do a search of /usr/local/Trolltech/Qt-4.4.0/include, do any of those files contain QCoreXmlStreamWriter? If they do, check to see if such references are inside #ifdef …

Member Avatar for kmote
0
254
Member Avatar for besktrap

Filenames with spaces need quotes [ICODE]TYPE [COLOR="Red"][B]"[/B][/COLOR]C:\Documents and Settings\Owner\My Documents\Log.txt[COLOR="Red"][B]"[/B] [/COLOR][/ICODE]

Member Avatar for mittelgeek
0
182
Member Avatar for Lothia

> Career opportunities Hard to pin down now, nevermind in several years time when you graduate. > average pay of specific computer science fields Again, depends where you are and what's flavour of the month when you need to start looking. What's hot today could be well out of date …

Member Avatar for Rich_121
0
194
Member Avatar for Luckychap

Any particular "brand" of "unix"? An awful lot of things claim to be "unix", even many things which only look like "unix".

Member Avatar for Luckychap
0
153
Member Avatar for alajessie

> outfile << "\n\nThe following string was checked for being a palindrome:" So why don't you print data (your input array) rather than messing with 20+ lines of stack pushing and popping? If your argument is that it may have unwanted characters, then consider another function to "clean" the line, …

Member Avatar for Salem
0
5K
Member Avatar for mammoth

What's wrong with using the proper API to remove a file? Like say [ICODE]unlink( "C:\\users\\robocop\\desktop\\a b c.txt" ); remove( "C:\\users\\robocop\\desktop\\a b c.txt" ); [/ICODE] Neither of which require you to guess how many times you need to escape \" or whatever to get the command interpreter to do what you …

Member Avatar for Salem
0
99
Member Avatar for wendy2learn
Member Avatar for Zwelinzima

Well how well do you actually know Java? Knowing a bunch of easy answers might seem like a good idea, and may occasionally get you the job. Keeping the job on the other hand will require you to actually know your stuff, and not just have a good short-term memory …

Member Avatar for Salem
0
78
Member Avatar for Arne Kristoffer

> 2: Open Project/solutions-settings and add the include and library-folders to the list. You also need to add the library name(s) as well to the list of additional libraries (also on the linker settings somewhere).

Member Avatar for Salem
0
557
Member Avatar for lxexlx

[quote=first search engine result] "This directory contains the source code and shell scripts necessary to convert SEGY files to ASCII format and to create postscript plots, along with a makefile and a README file."[/quote] I found that with an obvious web search. Is it what you want? Can you guess …

Member Avatar for Salem
0
275
Member Avatar for dmanw100

> while (!myfile.eof()) [url]http://faq.cprogramming.com/cgi-bin/smartfaq.cgi?answer=1046476070&id=1043284351[/url] Use [ICODE]while ( getline(myfile, line) )[/ICODE] Try it with a small text file (say 5 lines) and note the difference.

Member Avatar for dmanw100
0
137
Member Avatar for Flawless

Wow, a 4 year bump, and the answer is still the same? Did the bumper bother to read anything, or just attach the same question based on the result of a feeble search?

Member Avatar for brain
0
2K
Member Avatar for Alex Edwards

[url]http://www.nondot.org/sabre/os/articles[/url] (down just at this moment). There's a whole section of various file systems.

Member Avatar for Salem
0
91
Member Avatar for ithelp
Member Avatar for PuQimX

You missed this on your way in [B][URL="http://www.daniweb.com/forums/announcement8-2.html"]We only give homework help to those who show effort[/URL] [/B]

Member Avatar for AceofSpades19
0
553
Member Avatar for Zelores

> My friend basically did it all for me. Well there's your problem. Unless you do all the work, AND make damn sure you understand all the reasons why you did everything ("I guessed and it worked" doesn't count), then you're doomed to fail from the moment you get someone …

Member Avatar for Zelores
0
165
Member Avatar for Clockowl

Function pointers need more ( ) [ICODE]vector<bool(*)(int x)> rules;[/ICODE]

Member Avatar for Clockowl
0
148
Member Avatar for plike922

Well that would depend on how "string" is declared in your C program.

Member Avatar for Aia
0
85
Member Avatar for HecB

Without seeing some source code, there's not a lot we can do except admire your artwork.

Member Avatar for vmanes
0
107
Member Avatar for Hannahlv

Nevermind the database, you need to work on the basics of C programming. > int main([COLOR="Red"][B]([/B][/COLOR]int argc, char *argv[]){ Mis-matched. You didn't even compile this before posting did you. > fflush(stdin); [url]http://faq.cprogramming.com/cgi-bin/smartfaq.cgi?answer=1052863818&id=1043284351[/url] > gets(opt_host_name); [url]http://faq.cprogramming.com/cgi-bin/smartfaq.cgi?answer=1049157810&id=1043284351[/url] Not only that, where is opt_host_name pointing? Answer - nowhere. Practice reading input using char …

Member Avatar for Salem
0
193
Member Avatar for Salem

In the blurb to encourage guests to sign up, there's this line. "[COLOR="Red"]In fact, there are 4,267 IT professionals currently interacting right now![/COLOR]" Nope, not by a long shot. I bet a lot of people think "[COLOR="Green"]Wow, must be a great place, I'm sure to get my question answered here …

Member Avatar for thunderstorm98
2
126
Member Avatar for valuum

[URL="http://sourceforge.net/projects/dban/"]Darik's Boot and Nuke ("DBAN") is a self-contained boot floppy that securely wipes the hard disks of most computers. DBAN is appropriate for bulk or emergency data destruction.[/URL] How long did you let it run for before you realised your mistake?

Member Avatar for Salem
0
26
Member Avatar for micheal_lobster

General comments: 1. The indentation needs work. 2. Lower level functions should just return results. Maybe I just want to search, WITHOUT print the result AND clear the screen. > void random(int []); Well named variables in the prototype will help document the API. What we've learnt so far is …

Member Avatar for Salem
0
308
Member Avatar for LiquidScorpio81

> Last edited by LiquidScorpio81 : 43 Minutes Ago at 18:45. It's a shame you didn't add the code tags. "Hey, I know, lets piss off all the people who help around here by continually posting unindented crap." Doesn't work kiddo. Either we ignore you, or just report the post …

Member Avatar for VernonDozier
0
1K
Member Avatar for dv1r

Do you have to do it in C? Because it's like a 5 minute job and a handful of lines of code in say Perl.

Member Avatar for Salem
0
108
Member Avatar for milonimim

Rule 1 - don't spam the crap out of the net with your cross posting [url]http://www.catb.org/~esr/faqs/smart-questions.html#forum[/url] Already answered here - [url]http://cboard.cprogramming.com/showthread.php?t=106619[/url] If a forum doesn't deliver, then you're free to move on. Broadcast spam like this just pisses people off. Rule 2 - read ALL (not as in your case, …

Member Avatar for Salem
0
158
Member Avatar for deadpool66

<vader>I sense a [URL="http://www.daniweb.com/forums/thread142501.html"]presence on the forum[/URL], which I've not sensed since.....</vader> > Generate a set of test inputs and expected results for the Currency Conversion program. Starting with an example "good" input and some examples of bad input (you ask for an integer, you type in "hello" say).

Member Avatar for Salem
0
126
Member Avatar for Repurcussion

Do you have a specific test case? Are you sure it's not something like 1234567 being displayed as say 1.23456E6 (for example).

Member Avatar for Repurcussion
0
166
Member Avatar for DigitalPackrat
Member Avatar for LiquidScorpio81

> int ar[100]; But if you write the code [URL="http://www.talklikeapirateday.com/wordpress/"]on this day[/URL], it would be [ICODE]int arrrrrr[100];[/ICODE]

Member Avatar for Salem
0
87
Member Avatar for badbloodyeyez

I assume you're talking about plugging a device into a standard desktop machine running say Linux or MacOS, and you want to record when the user logs off the desktop machine. This is a pretty good hardware site. [url]http://www.lvr.com/[/url]

Member Avatar for badbloodyeyez
0
110
Member Avatar for psycheheaven

> 1B 5B 33 67 = ESCAPE [ 3 g > 1B 48 = ESCAPE H [url]http://clusty.com/search?query=escape+sequence+ANSI&sourceid=Mozilla-search[/url] And an ASCII table if you can't do that stuff in your head yet. I'm guessing your "cd /home/user" is an alias for something which outputs a bunch of escape sequences and then …

Member Avatar for psycheheaven
0
110
Member Avatar for mabuse

A couple of things. 1. VC6 is probably 10 years older than your Linux compiler. 2. Have you considered using [URL="http://www.sgi.com/tech/stl/Vector.html"]reserve()[/URL] to allocate all the space up front, then just subscript your accesses (rather than push_back)

Member Avatar for mabuse
0
475
Member Avatar for OmniX

Well the last line would (probably) launch Excel on a machine where Excel was installed, and all the file associations were set up correctly. Other than that, your analysis is good.

Member Avatar for l4z3r
0
252
Member Avatar for james blake

Yes, faster to the first bug than almost any other language. #include <std_troll.h>

Member Avatar for Salem
-3
59
Member Avatar for plike922
Re: Help

[ICODE]#define _CRT_SECURE_NO_WARNINGS[/ICODE] Put this at the very start of your program - the first line in fact. > error C2087: 'numbers' : missing subscript > void getArray (int numbers[][]); You're only allowed to leave the left-most one empty. All the other subscripts need a size. > space[x][y] = false; What …

Member Avatar for Salem
0
363
Member Avatar for leelingling630

> Alas, I have no time to inspect your code more carefully now. Take your time, it was posted (and abandoned) on 8th Jan 2005

Member Avatar for ArkM
0
197
Member Avatar for peekamalts

Looks perfect to me, what's the question? I should say, what's the requirement. Because without that, the post is meaningless. I mean, I could guess this is a currency conversion program (in which case, it's pretty good). But if it's for a game of chess, then it's rubbish. Consistency perhaps? …

Member Avatar for Salem
-1
189

The End.