5,237 Posted Topics

Member Avatar for techie82

Placing things in memory is down to the linker, not the compiler. Which tool chain (compiler, linker etc) are you using?

Member Avatar for Infarction
0
113
Member Avatar for best

My clairvoyant skills tell me the problem is on line 12 of your code. But since few other people possess such skills, I guess you'll just have to post what you tried so far. Make sure you read the "how to post code" sticky thread at the top of the …

Member Avatar for Aia
0
86
Member Avatar for emr

> You cannot use C to solve this problem. Of course you can, it just takes an additional library to help you do all the hard stuff. [url]http://gmplib.org/[/url] Or if you're only interested in a couple of math ops, then you could work out how to do long arithmetic in …

Member Avatar for Aia
0
194
Member Avatar for LieAfterLie

Put the %1 in quotes, like "C:\Program Files\Text Compress\TextCompress.exe" "%1"

Member Avatar for vijayan121
0
122
Member Avatar for Navrex

Two things spring to mind. 1. Your script kiddie speak is hard for me to read, and I'm a native English speaker. One wonders what others think of it who are not native speakers. [url]http://www.catb.org/~esr/faqs/smart-questions.html#writewell[/url] 2. Your code is so badly indented that neither you nor anyone else can figure …

Member Avatar for jwenting
0
111
Member Avatar for Sacky

> push((unsigned char)(ps[idx].v.val & 0xff); Well this line is missing a )

Member Avatar for Sacky
0
106
Member Avatar for tjay

> its not for me but for my boss's doughter. Ohhh - smoochies by proxy. Nope, sorry, doesn't cut it. Got anything else in #include <std_excuses.h> [url]http://www.daniweb.com/techtalkforums/announcement8-2.html[/url]

Member Avatar for Lance Wassing
-1
396
Member Avatar for ntredame
Member Avatar for ntredame
0
4K
Member Avatar for galmca

I'm sure it was worth waiting 2 YEARS for you to show up with an answer :rolleyes: In the meantime, feel free to swing by the "[URL="http://www.daniweb.com/techtalkforums/announcement8-3.html"]how to use code tags[/URL]" readme thread at the top of the forum on how to post code which isn't an unindented mess.

Member Avatar for John A
0
179
Member Avatar for ajaxjinx

Well a lot depends on your OS and compiler. Are you allowed to use libraries like ncurses?

Member Avatar for vijayan121
0
988
Member Avatar for shmay

[code] int arr[10]; int *pArr = malloc ( 10 * sizeof *pArr ); myFunc( arr ); myFunc( pArr ); [/code] The function itself doesn't care whether you have a real array or a pointer to allocated memory, the function is declared and written in exactly the same way.

Member Avatar for ft3ssgeek
0
212
Member Avatar for Lance Wassing

I'd suggest you start with the simple obvious thing of using strtok (in C), or using getline() with a delimiter (C++). File I/O is going to have a lot more impact on how long this is going to take than what you might do in finding and splitting a string …

Member Avatar for WaltP
0
134
Member Avatar for jan1024188
Member Avatar for jan1024188
0
142
Member Avatar for XxBigxBossxX

Maybe because kbhit() doesn't read keys, it only tells you whether there is a key available. To actually read it, use getch() or something like it (since you seem to be in DOS land).

Member Avatar for John A
0
77
Member Avatar for negbballer54

Apparently [url]http://www.daniweb.com/techtalkforums/announcement8-3.html[/url] Isn't in a big enough font, all the noobs keep missing the point.

Member Avatar for negbballer54
0
101
Member Avatar for grunge man

> #define SIZE 10; Step 1 is remove the ; Step 2 is to stop using the pre-processor to declare constants in C++ programs, and declare [INLINECODE]const int SIZE = 10;[/INLINECODE]

Member Avatar for Salem
0
99
Member Avatar for Jmosure

Reading isn't your strong point is it? You missed this - [url]http://www.daniweb.com/techtalkforums/announcement8-3.html[/url] describing code tags. You ignore the watermark at the back of every edit window telling you about code tags. I asked you here [url]http://www.daniweb.com/techtalkforums/thread73983.html[/url] to use code tags as well. What's it going to take?

Member Avatar for thekashyap
-1
430
Member Avatar for Jmosure

void readList(int nums [], int size); void printList( int list[1000]); Notice what's different ? The 1000 isn't actually doing anything useful (nor is it actually harmful either). It certainly has nothing to do with the size of the array being passed. Also, read the intro threads and how to use …

Member Avatar for Jmosure
0
798
Member Avatar for aPPmaSTer

> for(int j=count;j<prod;j++); It didn't fix a damn thing, you just moved the problem. The scope of 'j' ends at that ; at the end of the line - this is a loop which does NOTHING then exists. Had you removed this ; then the problem would have fixed itself …

Member Avatar for aPPmaSTer
0
212
Member Avatar for muggle_spy

Make an effort, this isn't [url]www.spoon-fed-programmers.com[/url] [url]http://www.daniweb.com/techtalkforums/announcement8-2.html[/url] Then learn some netiquette [url]http://www.catb.org/~esr/faqs/smart-questions.html#writewell[/url] The SHOUTING, the colours (it burns it burns), the stupid "leet speek" wannabe writing style, and the overuse of smilies.

Member Avatar for muggle_spy
0
147
Member Avatar for i_like_pi

> Just out of curiosity, does anybody know how it works? Read the documentation and download the code.

Member Avatar for i_like_pi
0
90
Member Avatar for jan1024188

> PostQuitMessage; Maybe if this were a function call, say PostQuitMessage(0); Perhaps posting actual error messages instead of "it doesn't work" would help as well.

Member Avatar for jan1024188
0
117
Member Avatar for addicted

Help means you've done something already, and then got stuck on some specific question. [url]http://www.daniweb.com/techtalkforums/announcement8-2.html[/url]

Member Avatar for thekashyap
0
97
Member Avatar for Derice

Argh!! - it burns - untagged void main code - make it stop!!!! Not to mention [url]http://www.catb.org/~esr/faqs/smart-questions.html#urgent[/url]

Member Avatar for iamthwee
0
135
Member Avatar for Amanda21
Member Avatar for 23Zone

Learn about code tags - [url]http://www.daniweb.com/techtalkforums/announcement8-3.html[/url] Didn't you see the watermark when you were writing your post?

Member Avatar for Salem
-1
104
Member Avatar for Chimera

scanf("%s", &local); printf("Introduce el nombre del equipo visitante:\n"); scanf("%s", &visitante); Both these variables need to be char arrays, not single chars, if you want to store a string there.

Member Avatar for Chimera
0
273
Member Avatar for mohiuddin.shaik

Seems simple enough [code] int main() { if (!printf("welcome ")) { printf("welcome"); } else { printf("to ieg"); } return 0; }[/code]

Member Avatar for John A
0
95
Member Avatar for lookingforhelp

[url]http://www.catb.org/~esr/faqs/smart-questions.html#urgent[/url] I suppose the easiest one to explain is to take the 8:8:8 (8 bits red, 8 bits green, 8 bits blue) and turn it into 3:3:2 format. This is simply a matter of taking the top 3 bits of red and green, and the top 2 bits of blue, …

Member Avatar for John A
0
116
Member Avatar for satish.paluvai
Member Avatar for zenah

"Congratulations" on the most useless bump of a 2+ year old thread :mad:

Member Avatar for Salem
0
162
Member Avatar for delner

> You have to specify at least first dimension otherwise its not going to work anyway. > The secong dimension can be left unspecified. Wrong way round - it's only the left-most dimension which can be left empty, all the minor dimensions need to be specified.

Member Avatar for Salem
0
75
Member Avatar for tripo03
Re: C

> it returns diferents results than the original one which works good... Development stops when the program produces the expected answer, not when it is bug free. Porting to another platform is usually when a whole host of previously hidden bugs first make an appearance. In essence, you need to …

Member Avatar for Salem
0
101
Member Avatar for amt_muk

Well that really depends on whether myFunc was declared with char* because - the programmer was too lazy to say const - because the function does actually modify the string. The first is fixed by fixing the code. The second is fixed by making a modifiable copy of the string …

Member Avatar for amt_muk
0
203
Member Avatar for hgseric
Re: Lcd

That data sheet talks about parallel or serial versions, you need to figure out which one you've got. Read the appropriate one of these, for the type of operating system you're running on your development PC. [url]http://www.lvr.com/parport.htm[/url] [url]http://www.lvr.com/serport.htm[/url] I'm assuming this device is plugged into your PC in some fashion. …

Member Avatar for hgseric
0
152
Member Avatar for Slavrix

> cout << [B][COLOR="Red"]'[/COLOR][/B]Your new monthly salary is: " << nMthSal << endl; Well this line should use double quote at the beginning, not single.

Member Avatar for Slavrix
0
106
Member Avatar for Sabi_146

[url]http://www.daniweb.com/techtalkforums/announcement8-2.html[/url] [url]http://www.catb.org/~esr/faqs/smart-questions.html#urgent[/url]

Member Avatar for ~s.o.s~
0
87
Member Avatar for tjay

Wow - that's the most impressive bit of board abuse that I've seen in a long while. [url]http://www.daniweb.com/techtalkforums/announcement8-2.html[/url] Is all that lot in the 1/2MB doc attached to your other post? [url]http://www.daniweb.com/techtalkforums/thread73333.html[/url]

Member Avatar for Aia
0
152
Member Avatar for grunge man

It's just another character which is valid to use in identifiers Like [INLINECODE]int number_of_apples;[/INLINECODE] Another popular choice is camel case, which would be [INLINECODE]int numberOfApples;[/INLINECODE] Both are generally better than say [INLINECODE]int numberofapples;[/INLINECODE]

Member Avatar for grunge man
0
123
Member Avatar for iqbal

Please use [c[b][/b]ode][/code] tags around your code. Nobody wants to read a whole mess of unindented code.

Member Avatar for John A
0
120
Member Avatar for aPPmaSTer

> int array[]={4,3,5,7} Think about recursion in terms of 4 + all combinations of 3,5,7 3 + all combinations of 4,5,7 .. .. Which becomes in the recursive step 4 + 3 + all combinations of 5,7 4 + 5 + all combinations of 3,7 When you're down to all …

Member Avatar for aPPmaSTer
0
109
Member Avatar for Nholdamek

Probably because the memset on line 721 is trashing memory. Whenever you have a <= and an array, it's a pretty sure bet you really meant <, and that you've just stepped off the end of the array. Plus, it's all so unnecessary as well. What you should have had …

Member Avatar for Nholdamek
0
291
Member Avatar for gamodg

main returns an int (see the avatar) You could do [code] for ( i = 0 ; i < 30 ; i++ ) { sprintf( a, "file%02d.txt", i ); fstream file; file.open(a,ios::in |ios::out); file<<"anshulgarg"; file.close(); } [/code] Which will generate file00.txt to file29.txt This reacts much better to you changing …

Member Avatar for Salem
0
83
Member Avatar for jivosan

> but I'm wondering which function will do the trick-read a char from keyboard without need to press "Enter" Yes there is, but not without you saying which OS / Compiler / application type (console, GUI etc) you're trying to write. There isn't a standard "one way works for everyone" …

Member Avatar for Salem
0
166
Member Avatar for paeez

> p->next=p->next=->next; It doesn't do anything, because it won't compile. Also, since you keep changing p, your condition will never fail (loop forever, chasing your tail like some demented dog).

Member Avatar for Salem
0
64
Member Avatar for ziofu

Read everything as a string, then convert it to an input string stream where you can work your way through it at your own pace. Example [code] #include <iostream> #include <sstream> #include <string> using namespace std; int main ( ) { cout << "Enter command " << flush; string s1; …

Member Avatar for ziofu
1
114
Member Avatar for ideas-adv

[url]http://www.daniweb.com/techtalkforums/announcement8-2.html[/url] This should be in a bigger font, people keep missing it and just dumping their homework on the board. Since this isn't likely to be your first assignment, then it means you must have done some of the preparatory work before, like reading files or extracting data.

Member Avatar for ideas-adv
0
104
Member Avatar for daljeet_smt
Re: c++

Tell us your OS and compiler, and the kind of program you're trying to create (console or GUI), and perhaps you'll get a more meaningful answer.

Member Avatar for Salem
0
51
Member Avatar for jan1024188

Your question is meaningless. One is an application framework, and the other is a compiler. [url]http://www.trolltech.com/developer/notes/compilers[/url] You use VC++ to compile your QT application on a windows platform You use GCC to compile your QT application on a Linux platform.

Member Avatar for ~s.o.s~
0
245
Member Avatar for vicky_dev

[url]http://en.wikipedia.org/wiki/Floating_point[/url] Never compare floats using == or != Your answer may be very close to zero, but if it's even the tiniest bit off, then your code will fail. Floating point numbers are approximations, which means you need to make approximate comparisons, or range comparisons. So rather than == 0, …

Member Avatar for vicky_dev
0
84

The End.