15,300 Posted Topics

Member Avatar for Dean_Grobler

A rottweiler dog so that I can teach pesty neighbors a few lessons. Superpowers: jaws of steel.

Member Avatar for Sulley's Boo
0
66
Member Avatar for ishaan3731

First thing is that you need a list of the items for sell and quantities on hand. You might have something like this: [code] class item { std::string name; std::string upc_number; // prodct it, or barcode int quantity; float price; }; [/code] Now create a vector of those for each …

Member Avatar for WaltP
0
168
Member Avatar for wildplace

The short answer it No -- not with scanf(). scanf() will stop processing keyboard input when the first non-digit is reached or when no more charcters in the keyboard buffer. That function does no error checking.

Member Avatar for Narue
0
156
Member Avatar for kratosaurion

lines 1 thru 7: remove the semicolons at the end of those lines The compiler vc++ 2010 express produces a lot of warnings about double to int and vice versa conversions. You should treat all those warnings as actual errors because they can often cause problems. After making appropriate typecases …

Member Avatar for kratosaurion
0
456
Member Avatar for coding101

looks like it is calling a function to see if two strings are equal or not.

Member Avatar for Ancient Dragon
0
93
Member Avatar for narlapavan

Maybe you need to explain the problem a little more. The way I do it is to look at the monitor.

Member Avatar for L7Sqr
0
149
Member Avatar for seanmchugh.info

He was banned not for what he said to and about me, but for spamming all the forms on PFO with a post nearly identical to this one. And I closed his threads to avoid pissing contests and/or flame wars, which is where those threads were headed. Up until he …

Member Avatar for abelLazm
-1
133
Member Avatar for Taibah

Read through [URL="http://winprog.org/tutorial/"]this tutorial [/URL]-- it will teach you all the basics.

Member Avatar for Ancient Dragon
0
255
Member Avatar for jnewing

>>long some_long = (long)&foo[6]; I think that's called undefined behavior, typecasting an address into a long integer. The two may or may not be the same size, depending on the compiler you are using. The way I would do it is like this: [icode]long some_long = *(long *)&foo[6];[/icode]

Member Avatar for Insensus
0
215
Member Avatar for goldeneagle217

ShellExecute() or CreateProcess(). Which to use depends on how much control you want over how the new process is created. Once the program is compiled it doesn't matter what language it was originally written in. The original language is lost in *.exe programs.

Member Avatar for Ancient Dragon
0
183
Member Avatar for kumarmpk4u

>>Am doing migration from 16 bit code to 32 bit... help me to solve the issue... There were some very major changes to MFC between the two versions. Which 32-bit version of the compiler are you using? I hopt it will be vc++ 2010. Look up the function [URL="http://msdn.microsoft.com/en-us/library/sa2c737c(v=vs.80).aspx"]GetFirstDocTemplatePosition[/URL]() and …

Member Avatar for Ancient Dragon
0
115
Member Avatar for chester1908

>>So,question is,how do i set a struct to null? In an array, you can't. One way to do it is to add a deleted flag to the structure and set it to true if the struct is to be considered deleted. Another option is to set the first byte of …

Member Avatar for Ancient Dragon
0
195
Member Avatar for mafiasam

If you don't want to be a member of DaniWeb then just simply stop posting. It isn't any easier than that.

Member Avatar for Portgas D. Ace
1
264
Member Avatar for GaidinDaishan

Yes, it is true that the compiler produces 32-bit code, but that should not have been the problem. I also have 64-bit Windows 7 and never have a problem using 32-bit DLLs. What version of VB are you tring to use?

Member Avatar for Ancient Dragon
0
266
Member Avatar for ashrafu1

>>1. i already have ("CLS") and ("cls") ( both of them but i do not know whats the difference) . CLS and cls are the exact same thing. MS-Windows does not distingish between cases line *nix does. >>will this cls duo make any problem for a 3rd one what 3d …

Member Avatar for ashrafu1
0
456
Member Avatar for salty11
Member Avatar for salty11
0
180
Member Avatar for jingda

It might be nice to have a thread that contains all the featured posters and the articles written about them. Sort of like a history book of featered posters. As it is now its not possible to read the intervies. Say I wanted to re-read SOS's interview -- not possible …

Member Avatar for jingda
0
185
Member Avatar for Protoroll

>>I get an error whenever I try to run it. What was the error? >>x = (int*)malloc(length*4); what makes you think the size of an integer is 4??? Maybe it is, and maybe it isn't. The size of an integer depends on the compiler you are using. A more portable …

Member Avatar for Protoroll
0
243
Member Avatar for lilsid

First thing to do is design the database. What will it contain for each customer? How will it be written -- binary or text ? I assume you want to just use a standard file instead of an SQL compliant database, such as MySQL or MS-Access, which would be overkill …

Member Avatar for Ancient Dragon
0
83
Member Avatar for HASHMI007
Member Avatar for Ninjaboi

If you use MinGW then [URL="http://www.velocityreviews.com/forums/t287965-static-linking-of-c-libraries-with-gcc-g.html"]this thread[/URL] may help you. Go to project options, linker tab, and add -static flag. But that flag didn't seem to make any difference with my small test program. >>tell me a way to link to the .dll files I need without having them directly …

Member Avatar for Ninjaboi
0
2K
Member Avatar for salty11

One way to do it is to check the agent array to see if it already contains an entry for the agent just read in from the file. If it already exists then just sum the sales and value into the respective sales and values column. something like this: [code] …

Member Avatar for salty11
0
547
Member Avatar for Romil797

why don't you ask QT? [URL="http://qt.nokia.com/"]Join their mailing lists[/URL]. But my guess is that you can't because QT is cross-platform. If they added .NET support then it wouldn't be cross-platform any more.

Member Avatar for Ancient Dragon
0
70
Member Avatar for hastingo

How much assembly do you already know? Its really probably not all that hard to do. You need to declare storage for four variables, a, b, c and d. First calcaulate c^2 (which is just c * c), and d^2 (d * d). store that result away somewhere. Then calculate …

Member Avatar for Ancient Dragon
0
111
Member Avatar for rockerjhr

The problem is not related to atoi(). [code] static int getdigit( int num, int position ) { int digit = num / (int)pow(10,position-1) % 10 ; return digit ; [/code] division by 0 problem. pow() is returning 0 probably because the second parameter to pow() is a negative number (the …

Member Avatar for Ancient Dragon
0
238
Member Avatar for elbiociq

You seem to have your head together and are doing the right things. Stay in school and get a bachelor's degree from a 4-year college or university. Programmers today are a dime a dozen and you need to make yourself stand out from the crowd. Getting a 4-year degree will …

Member Avatar for elbiociq
0
216
Member Avatar for flowerzink

You can open the stream in both input and output modes -- just use the | or operator [icode]fstream file("text.txt", ios::in | ios::out);[/icode]

Member Avatar for Ancient Dragon
0
166
Member Avatar for mark103

The problem is that the toolstrip objects in Form1 are declared private. Form2 will be unable to view them without a public function in Form1 that will expose their contents or check status. Write a public method in Form1 that returns the check status of a menu item.

Member Avatar for Ancient Dragon
0
98
Member Avatar for Drakswan

If you know how to use linked lists you would be better off with a linked list of lines than that very huge array of strings. Something like this [icode] struct node { struct node* next; char line[255]; }; [/icode] Since this is c++ you could use std::vector instead of …

Member Avatar for Ancient Dragon
-1
1K
Member Avatar for C++NewBe

The parameters in function you posted for "what I have so far" must match exactly the parameters of the function prototype. In otherwises, the function prototype are double[], int, and int. Yours is double[], double[] and double; Not the same, one of the two is wrong.

Member Avatar for VernonDozier
0
136
Member Avatar for tc121091

Your link wants me to download and install some unknown rar file on my computer. Ain't going to happen in this lifetime. If you want us to see the instructions you were given all you hve to do in attach the text file to your post using the Advanced Editor …

Member Avatar for VernonDozier
-1
89
Member Avatar for Fortinbra

That makes three of us, almost. I live about 30 miles from that town.

Member Avatar for feligak
1
197
Member Avatar for ak24

[URL="http://www.cplusplus.com/reference/clibrary/cstdio/vsprintf/"]This link [/URL]has an example of how that function works. If you know how sprintf() works then you're nearly home with vsprintf(). Then if you read [URL="http://www.cppreference.com/wiki/io/c/snprintf"]this thread[/URL] you will see that the second parameter to vnsprintf() is the number of characters in the buffer. When compiled for UNICODE sizeof(TCHAR) …

Member Avatar for ak24
0
276
Member Avatar for boot-baby-boot

MySQL is very popular. But I don't know what you mean by "light". Its either SQL compliant or it isn't. I also don't know about its ability to recover after a crash. Since its so popular I can only assum that it can do it.

Member Avatar for boot-baby-boot
0
164
Member Avatar for darkeclipse8

line 31: The sizeof(a) will not give you the number of rows in the array. What you want is to use the already defined macro SZ that appers on line 3. How to increment: (*a[i])++;

Member Avatar for Ancient Dragon
0
115
Member Avatar for Thendi

you only have 30 minutes to edit a post. After that you will either have to make another post to correct errors in the previous post, or report the post (hit the Flag Bad Post button) and explain what you want the mods to change. Whether they will change it …

Member Avatar for jingda
0
106
Member Avatar for Ancient Dragon

I'm trying to find the code snippets I have posted -- it why is to do damned difficult? There used to be a link to our code snippets but its gone now. I tried advanced searched, enter my name in user id block, selected code snippets, then hit the search …

Member Avatar for Ancient Dragon
0
107
Member Avatar for LanguidLegend

Are you required to use inline assembly for this program? It's so simple in C, why do it the hard way??? [icode]printf("what is %s and where is %s", argv[1], argv[1]);[/icode] In any event, you need to use a loop to copy the characters, or you can set up the call …

Member Avatar for Ancient Dragon
0
331
Member Avatar for caltech
Member Avatar for VernonDozier
-7
249
Member Avatar for Ninjaboi

The command-line compiler is cl.exe. In a command prompt window (DOS box), first run vcvars32.bat found in the compiler's install bin directory. That will set all the environment variables needed to run cl.exe cl.exe uses many of the flags that are commonly found in make files. /I followed by include …

Member Avatar for Ninjaboi
0
139
Member Avatar for kchyn

Did you try [URL="http://lmgtfy.com/?q=c+compilers+for+microcontrollers"]google[/URL]

Member Avatar for ziggystarman
0
366
Member Avatar for WaltP
Member Avatar for WaltP
2
162
Member Avatar for d4nn7

That's a very very broad subject and could probably write a whole book about it. Re-think it like this: how does the policies of your school affect you? Basically the boss will tell you "Follow my policies or else -- if you don't like them then go work somewhere else." …

Member Avatar for jwenting
0
131
Member Avatar for finchh

>> The file names are specified on the command line: That means you need to declare main() with two arguments -- argc and argv. argv[1] is the input file name and argv[2] is the output file name. Your program should not prompt for these names. >>cout << "Enter <strong class="highlight">the</strong> …

Member Avatar for Ancient Dragon
0
92
Member Avatar for Buffalo101

My guess is that you have not even attempted to compile that code. It contains errors that you need to fix. For example: CMyMessage line 77: error -- you can not store a pointer in one byte of memory.

Member Avatar for Buffalo101
0
688
Member Avatar for Ahmed sunny

Finally someone had enough smarts to know what a RAM disk is. I suspect only us older people have ever heard of it because its only supported on 16-bit MS-DOS operating system, which used randrive.sys file at boot time. AFAIK they can not be created in 32 or 64-bit os. …

Member Avatar for Adak
0
2K
Member Avatar for Kanoisa

Yes I think its misplaced thinking. What if there are no items in the queue, and reader tries to read while writer tries to write? Everyone needs to be locked out while writer tries to write to the queue. Depending on how your code is written there could be more …

Member Avatar for Kanoisa
0
659
Member Avatar for Buffalo101

why are you calling GetName() so many times??? And for what purpose is the second parameter to that function? [code] char* xxx = GetName(); if( xxx != NULL) { printf("%s\n", xxx); memcpy(message+1,xxx,strlen(xxx)); } [/code]

Member Avatar for gerard4143
0
401
Member Avatar for c++prog

count them in a loop. Now post the code you have written if you have more questions.

Member Avatar for Ancient Dragon
0
50
Member Avatar for maxrio

what's the value of es when that function is entered? The screen address is at 0xB800:0000, so you have to read starting from there. I think your function needs to set the value of es and not assume it already contains the correct segment value. bx = upper left corner …

Member Avatar for maxrio
0
358

The End.