5,237 Posted Topics

Member Avatar for osirus0830

Behold the magic of indentation. #include <iostream> const int Months = 12; const int Years = 3; int main() { using namespace std; const char * months[Months]= {"Jan", "Feb", "Mar", "Apr", "May", "June", "July", "Aug", "Sept", "Oct", "Nov", "Dec"}; int i = 0; int j = 0; int temp = …

Member Avatar for Freaky_Chris
0
80
Member Avatar for skankest

What are T0IF and RCIF ? Imagine an interrupt control register, with flags for various kinds of interrupts. [code] +---+---+---+---+---+---+---+---+ | | | | | | | | | +---+---+---+---+---+---+---+---+ ^ ^ USART ---+ | TIMER -------+[/code] Setting both to 0 may be fine, if there is only ever one …

Member Avatar for skankest
0
139
Member Avatar for FtKShadow

> you can swap two ints with x^=y^=x^=y; Yeah, and when it isn't an int, then what? [url]http://c-faq.com/expr/xorswapexpr.html[/url] The same old hack gets posted time and time again. If you actually use a temp variable, a modern compiler will typically recognise that it is a swap, and do something sensible. …

Member Avatar for Salem
0
192
Member Avatar for kira27

Well first we need to establish which processor / operating system etc you're using. Because a MIPS answer for Linux won't do you any good if you're using an X86 for Windows.

Member Avatar for Salem
0
42
Member Avatar for annie_singh

Well [ICODE]\d+\.\d+[/ICODE] would match a single floating point number in non-scientific format.

Member Avatar for Salem
0
181
Member Avatar for amith_hrd

1. There are copious examples on the net for anyone with the sense to go searching for them. 2. They won't do you any good if you're running your fossil TurboC on a nice new OS like XP or Vista 3. [url]http://clusty.com/search?query=gsm+AT+commands&sourceid=Mozilla-search[/url]

Member Avatar for Salem
0
97
Member Avatar for psyman_86

Well the first thing you need to remember is arrays start at 0, not 1. 2. Arrays can be initialised, not assigned, eg [code] RF_RXTXPAIR_SETTINGS RF_SETTINGS[2] = { {0xA8,0x2F,0x37,0x50,0xA0,0x00,0x41,0xF6, 0x10,0x02,0x80,0x58,0x48,0x44,0x81,0x0A, 0xFF,0xC0,0x00}, {0xA8,0x2F,0x37,0x50,0xA8,0x00,0x41,0xF6, 0x10,0x02,0x80,0x58,0x48,0x44,0x81,0x0A, 0xFF,0xC0,0x00} }; [/code]

Member Avatar for Salem
0
156
Member Avatar for Bigboy06

Continued here [url]http://www.daniweb.com/forums/post701674.html#post701674[/url]

Member Avatar for Salem
0
144
Member Avatar for pkuchaliya
Member Avatar for pkuchaliya
0
72
Member Avatar for asifjavaid
Member Avatar for ssharish2005
0
2K
Member Avatar for omdnaik

[url]http://www.catb.org/~esr/faqs/smart-questions.html#writewell[/url] Most of us have got better things to do than to parse large amounts of kiddie/sms speak. This is a forum, not a chat room.

Member Avatar for ssharish2005
0
163
Member Avatar for rajataggarwal91

[url]http://en.wikipedia.org/wiki/Algorithmics_of_sudoku[/url] Y'know, try using a search engine once in a while.

Member Avatar for Salem
0
67
Member Avatar for Trekker182
Member Avatar for Trekker182
0
128
Member Avatar for hbmarar

You can have as many awk commands as you like Eg [CODE]awk ' /Exception happened/ { print } /Argument missing/ { print "19878 Static Fixed known error" } { print }' file.txt[/CODE]

Member Avatar for eggi
0
149
Member Avatar for abhishek29sep

So nothing in the past few years of study have ever prompted you to think "hey, this would make a great final year project". What, were you just along for the ride and hope the magic piece of paper will guarantee you fame and fortune? Even if we give you …

Member Avatar for abhishek29sep
0
201
Member Avatar for cam875

Ah, back to good old DOS days :) [url]http://www.nondot.org/sabre/os/articles[/url]

Member Avatar for cam875
0
97
Member Avatar for ambarisha.kn

DB DC etc also need to be char* as well. As does your baseAddrTable, it too needs to be an array of char*

Member Avatar for ambarisha.kn
0
137
Member Avatar for unk45

Rather than mess about with memory allocation (which is just as hard as the real problem you need to answer), start with. [code] const int MAX = 20; void initsquare( int square[][MAX] ) { for ( int r = 0 ; r < MAX ; r++ ) { for ( …

Member Avatar for Salem
0
693
Member Avatar for ashkash

> Unfortunately bit shifting is somewhat expensive from a performance stand point. How so? All but the most simplistic processors have these nowadays. [url]http://en.wikipedia.org/wiki/Barrel_shifter[/url] It's even free on some MIPS processors IIRC. As with all code, you should first work on making it right, before worrying about making it fast. …

Member Avatar for rpiper138
0
2K
Member Avatar for makubexiii

You might also consider that if they insist on using gets() that they really don't know C at all. What they're teaching you is a bunch of non-portable rubbish which is only good for the one compiler they know. It's all very well, but when you come to your next …

Member Avatar for makubexiii
0
140
Member Avatar for vmanes
Member Avatar for R0bb0b
0
168
Member Avatar for charusood

Ask your [URL="http://www.daniweb.com/forums/thread146908.html"]'friend'[/URL] for help as well.

Member Avatar for Lerner
0
283
Member Avatar for nichokongo

[url]http://clusty.com/search?query=safety+critical+software&sourceid=Mozilla-search[/url] Should take about 10 years to achieve competence. See you around ;)

Member Avatar for Denniz
0
83
Member Avatar for imnolongerhere

1. You want to be doing the %2 on the data in each node. 2. You need to be appending the found node to either the odd list or the even list, and NOT returing after the first match.

Member Avatar for imnolongerhere
0
99
Member Avatar for Caniggia

A hint of geography wouldn't hurt either. Like "where in the world are you" and "where are you prepared to travel to".

Member Avatar for Denniz
0
140
Member Avatar for NRaf

When you hit the segfault, use the "up" command a couple of times so you're looking at this frame #2 0x000171f8 in Compressor::compress () Then list the source code lines so you know exactly where you are. Then start examining variables (in particular, whatever string you're trying to assign) to …

Member Avatar for Salem
0
3K
Member Avatar for Kidd87

> pTemp = nnptr->link->link; This will break if you only have 1 node in the list. > acmetype *head; > inputfn(head); Does input initialise the list? Or is the end of the list whatever junk your uninitialised variable was pointing to.

Member Avatar for Salem
0
219
Member Avatar for Jennifer84

> running the following code with fgets the 162 mb file is read in 8 secs > running with fread it is read in 2 secs. Careful, make sure the second one isn't benefitting from the first one causing information to be cached somewhere. The problem with using fread() for …

Member Avatar for Jennifer84
0
7K
Member Avatar for zzmgd6

Or without casts and tricky subscript maths [code] char (*st2)[133] = new char[st.size()][133]; for(int i = 0; i < st.size(); i++) strcpy(st2[i], st[i].c_str()); fn(st2, st.size()); [/code]

Member Avatar for zzmgd6
0
204
Member Avatar for KarthigaB

If you have [ICODE]>file[/ICODE] to redirect stdout to a file, then adding this to the command line [ICODE]2>&1[/ICODE] will also redirect stderr to the file as well.

Member Avatar for Salem
0
95
Member Avatar for godlike111

> what is ISO C++ forbids comparison between pointer and integer? Or ISO C++ forbids comparison between elephant and battle ship. The fact that both are large, grey and heavy doesn't mean that they are in any way the same thing. In the same way that pointers and integers are …

Member Avatar for Narue
0
2K
Member Avatar for AutoC

How are you reading the files? Because "ÿ" is char 255, which is the same (typically) as (char)EOF That is, you reached the end of the file, but did not detect EOF properly, but instead cast it to a char.

Member Avatar for AutoC
0
103
Member Avatar for Feenix45

[url]http://www.daniweb.com/forums/announcement114-2.html[/url] [url]http://www.catb.org/~esr/faqs/smart-questions.html#urgent[/url] How about beginning with putting "Gauss-Seidel" into a search engine, and doing some reading.

Member Avatar for woooee
0
727
Member Avatar for ahamed101

How is that any different from calling [ICODE]fgets(buffer, sizeof buffer, stdin )[/ICODE]

Member Avatar for ahamed101
0
491
Member Avatar for acoxia

string.length() perhaps? Guessing you really are using C++ properly, and using std::string, and not say char arrays from C.

Member Avatar for acoxia
0
115
Member Avatar for chewedpup
Member Avatar for Salem
0
91
Member Avatar for campuzcrazyness

"Higher language Vs. Assembly language. " That's the title of a thread on this forum. Which is basically what you just asked.

Member Avatar for Salem
0
93
Member Avatar for Prathvi

Since you said "mobile", I take it we can't assume that you're talking about a windows desktop environment. In other words, be specific!

Member Avatar for Ancient Dragon
0
79
Member Avatar for bman923
Member Avatar for noadek

Gotta love the internet, you should try it sometime. [url]http://biometrics.cse.msu.edu/fingerprint.html[/url]

Member Avatar for Salem
0
247
Member Avatar for Malfunktion

[url]http://www.rocketaware.com/man/man2/rename.2.htm[/url] IIRC, the MacOS is a POSIX compliant OS (or close enough anyway) that functions like this should be available to you as well

Member Avatar for Salem
0
37
Member Avatar for bmead

First off, which "shell" are you talking about? There are many varieties (sh, bash, ksh, csh) and syntax varies. Maybe [ICODE]for i in `cat list`; do tail -21 $i; done[/ICODE]

Member Avatar for bmead
0
107
Member Avatar for mus1010

[url]http://www.daniweb.com/forums/announcement61-2.html[/url] At least demonstrate that you've a) searched the web b) copy/pasted any example code into your c# project.

Member Avatar for LizR
0
335
Member Avatar for Avaleriona

Get several sheets of paper, write one letter of a word on each one. "push" the letters onto a "stack" Then figure out how to get the letters back in reverse order to print them.

Member Avatar for Narue
0
173
Member Avatar for amt_muk

> system("A"); You may be in luck. Some implementations do the right thing with [ICODE]result = system("A");[/ICODE] The POSIX way would be to use fork(), execl() and wait(), something like [code] if ( fork() == 0 ) { execl() // run A } else { wait() // wait for A, …

Member Avatar for Duoas
0
372
Member Avatar for vadan

Your array has no size. My guess, it just trashes memory when you fill the first 10 non-existent slots.

Member Avatar for vadan
0
138
Member Avatar for rast1979
Member Avatar for tedobg

Which operating system? Which compiler? What sort of program - console, GUI, other?

Member Avatar for tedobg
0
268
Member Avatar for volscolts16

If you run the code in the debugger, wait for the assert, then use the stack trace to track back to your code, it should help you figure out the problem.

Member Avatar for skatamatic
0
104
Member Avatar for rakeshroxx

So what's our benefit in solving your homework? You do know that the whole array is sorted right?

Member Avatar for Salem
0
61

The End.