15,300 Posted Topics

Member Avatar for linq

[URL="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/windowing/windowclasses/usingwindow.asp"]Here[/URL] is an example

Member Avatar for Ancient Dragon
1
66
Member Avatar for aaholland

I see the program must be using curses?? Are you allowed to use non-ansi standard functions? >>Does this look correct to you guys How it "looks" is unimportant. Does your program compile with 0 errors and does it work ok when you run and test it?

Member Avatar for ~s.o.s~
1
98
Member Avatar for Iqbal_h_a

>>char *str="abcd"; There are two objects here -- the pointer itself is a variable that is on the stack. It contains the address of the string that is stored in the heap -- often in read-only memory. [edit]Sorry Holly I didn't see your last post when I posted this. The …

Member Avatar for ~s.o.s~
-1
200
Member Avatar for pavanpalaksha

Its not really all that difficult --[URL="http://bama.ua.edu/cgi-bin/man-cgi?popen+3C"] here [/URL]is an explaination of popen() and and example program. BTW you don't use system() with popen(), but call whatever program you want directly [code] char syscommand[BUFSIZ]; char inbuf[BUFSIZ]; sprintf(syscommand,"des -D -k %c%c credit0_e credit0",keys[i],keys[j]); if ((ptr = popen(syscommand, "r")) != NULL) while …

Member Avatar for Ancient Dragon
1
291
Member Avatar for kimw

Do you mean [URL="http://quantlib.org/"]Quantlib[/URL] open source library for quantitative finance ? I don't know a thing about it, but their web site has a lot of information including documentation and links to relevant forums. The site even contains links to example programs.

Member Avatar for kimw
1
183
Member Avatar for hygy486

Its unlikely you are being asked to write any of that with very advanced techniques such as using a graphics library, unless you are actually taking such a course. If this is your first year of programming then just use standard console-mode print statements to create small circles, triangles and …

Member Avatar for Ancient Dragon
2
204
Member Avatar for comp_sci11

probably because [URL="http://www.cs.colorado.edu/~main/cs1300/doc/bgi/bgi.html"]BGI[/URL] requires a 32-bit compiler, which TurboC is not. Upgrade to one of the free compilers mentioned in that link.

Member Avatar for ~s.o.s~
2
168
Member Avatar for santosdas

unlike MS-Windows, not all *nix machines were created equally. A 32-bit program compiled on one *nix computer may or may not run on another 32-bit *nix computer, unless the hardware is identical. There are many different flavors of linux/unix computers and they run many different chip sets (or whatever they …

Member Avatar for Rashakil Fol
1
113
Member Avatar for bops

The problem you see is due the the font the editor uses. Look around the editor's menu and see if it allows you to change the font, then find a font that supports the characters you want to use.

Member Avatar for Ancient Dragon
1
135
Member Avatar for padmakar

[URL="http://www.codeproject.com/audio/fister.asp"]Here[/URL] is one way to do it. If you google for "play sound" you will find other ways.

Member Avatar for ~s.o.s~
1
104
Member Avatar for vbcielle

look at the structure -- credit is an array of floats and you are attempting to use it as if it were a single float object. Change the structure to remove the arrays [code] struct cgrade { char course[50]; // room for 50 character course name float credit; float grade; …

Member Avatar for vbcielle
1
127
Member Avatar for dilip.mathews

I think you are encountering what is commonly called "undefined behavior" or "implemention specific". In C, [b]const int a points [/b]to a memory location that can be modified, but in c++ variable [b]a[/b] is not located at any memory variable but just used as an immediate value, which is similar …

Member Avatar for WolfPack
1
477
Member Avatar for saishn

The problem is classic case of buffer overrun. char i[iNumLen + 1]; The above does not allocate enough space for the result string. Boost libraries contain a regular expression c++ class. It might be worth tossing out this poort c implementation and using boost.

Member Avatar for Ancient Dragon
0
242
Member Avatar for assmaster

where is the c/c++ programming question? Did you check to see if the caps lock key is on :rolleyes:

Member Avatar for howsy
0
93
Member Avatar for jacove

Unlike most win32 api functions mapi does not have a library. Instead, you will have to learn how to use LoadLibrary() and GetProcAddress(), as explained in [URL="http://windowssdk.msdn.microsoft.com/en-us/library/ms529053.aspx"]MSDN[/URL] [quote] To use the Simple MAPI functions, compile your source code with MAPI.H. MAPI.H contains definitions for all of the functions, return value …

Member Avatar for ishwar
0
250
Member Avatar for himanjim

MS-Windows specific -- calls them [b]file handles[/b], otherwise the concept is the same as stated previously by Rashakil.

Member Avatar for mostafadotnet
0
156
Member Avatar for ishwar

std::string.substr() returns another std::string.and you can't mix C and C++ like that. you would need to allocate space for the substring [code] char * str; string str2 = "hello"; string str3; str3 = str2.substr(2,4); str = new char[str3.length()+1]; strcpy(str,str3.c_str()); [/code] C isn't nearly as kind to you as c++.

Member Avatar for ishwar
0
22K
Member Avatar for scoobie

from the command prompt just redirect the output to a file [code] c:> myprog.exe >file.csv <Enter> [/code]

Member Avatar for Salem
0
124
Member Avatar for mmiikkee12

[CODE] // BTW, this will eventually return a string containing the token_numth token. But I'm just trying to get it to work for now. void strsplit(const char *str, char splitchar, int token_num) { char *delimeter = "\0"; delimeter[0] = splitchar; [color=red]^^^ delimiter is a ponter that oritinally points to someplace …

Member Avatar for mmiikkee12
0
200
Member Avatar for Gunner54

This is now the THIRD TIME I've told you that you have to [URL="http://msdn.microsoft.com/vstudio/express/visualc/usingpsdk/"]FOLLOW THESE INSTRUCTIONS[/URL] . PAY ATTENTION TO Steps 3 through Steps 5. On my computer the SDK was installed here: D:\Program Files\Microsoft Platform SDK\Lib And yes, odbc32.lib is there. Check your computer to convince yourself that the …

Member Avatar for Gunner54
-1
178
Member Avatar for himanjim

The O/P you posted is wrong (the actual o/p may be slightly different from one computer to another because the second %c in the format string.) [code] char*str="∟";main(){printf(str,34,str,34);} [/code] The formatting string is the first argument to printf() -- it does not have to be a string literal and can …

Member Avatar for Ancient Dragon
0
246
Member Avatar for ishwar

try argv[0] [code] int main(int argc, char *argv[]) { printf("%s\n", argv[0]); return 0; } [/code]

Member Avatar for ishwar
0
144
Member Avatar for Gunner54

you need to download the Windows Platform SDK because Visual C++ 2005 Express does not include it by default. Go back to the download page and you will find the link at the bottom of the page. There are also instructions on how to set up the compiler to use …

Member Avatar for Gunner54
0
814
Member Avatar for hay_man

I don't normally post complete homework solutions, but since everyone else is, here's my 2 cents worth [code] #include <iostream> using namespace std; int main() { const char str[] = "1234567891234567"; char array[5][5] = {0}; int nums[5] = {0}; char *ptr; int numindex = 0; int i, total; ptr = …

Member Avatar for Ancient Dragon
0
235
Member Avatar for grunge man

c and c++ does not use the "then" statement as some other languages do. The next statement or block following the if statement is executed when the if statement is true. Notice the use of the double '=' symbol which is the logical equal. A single '=' means assignment. Lots …

Member Avatar for grunge man
0
754
Member Avatar for aeinstein

there is no standard naming convention that all programmers use, normally when you go to work for a software house the company you work for will have a set of standards that you must follow. Lacking that, you can use whatever you like.

Member Avatar for aeinstein
0
2K
Member Avatar for himanjim

read the manual! fgetc() does not return NULL when end-of-file. It returns EOF.

Member Avatar for Salem
0
166
Member Avatar for ganeshprasad_7

On MS-Windows os, look in C:\WINDOWS\system32\drivers\etc for hosts and services files. These two files will tell you which ports are used or available for use, but doesn't say whether they are accessible -- some may have been blocked by company policy or filewalls. *nix systems have similar files, but I …

Member Avatar for Ancient Dragon
0
119
Member Avatar for ammu117

VC++ 2005 Enterprise, but it will cost you about $2,000.00 :eek: also, read [URL="http://web.daniweb.com/techtalkforums/thread50370.html"]this[/URL] thread

Member Avatar for Grunt
0
180
Member Avatar for grunge man

>>and it worked fine but for some reason now it doesnt do what the program tells it to do' Yes, it does do exactly what you told it to do. But that may or may not be what you want it to do. :mrgreen: major problem is that you are …

Member Avatar for ~s.o.s~
0
106
Member Avatar for rafaelly2003

If it is running Microsoft Windows 2000 or XP, why can't you just install it like any other program?

Member Avatar for Ancient Dragon
0
36
Member Avatar for jazzz
Re: feof

1. do not use feof(). 2. your program is mixing binary file read with text file writes. If the file is truly a binary file then simply using fprintf() to write it to another file is not what you want to do. [code] char buffer[255]; size_t nBytes; while( (nBytes = …

Member Avatar for Ancient Dragon
0
101
Member Avatar for Panda123

you already said you need a loop, so I suppose you know how to do that. Inside the loop you need to format the filename based on the loop counter. [code] char filename[255]; // assum loop counter is variable i sprintf(filename,"file%d.jpg",i); utput.open(filename, ios:out|ios::binary); // output] [/code] There are a couple …

Member Avatar for Micko
0
95
Member Avatar for himanjim

getch() returns an int, not a char. And there is an open parenthesis missing in the if condition. [code] [color=red]int c; [/color] [color=blue]if( (c==getchar())!='\n')[/color] <snip> [/code]

Member Avatar for ~s.o.s~
0
165
Member Avatar for Mr B

my guess is that either (1) you are attempting to run a program that requires W2K or XP, or (2) the program has some bugs, possibly buffer overflows, that is causing it to scribble all over memory.

Member Avatar for Ancient Dragon
0
197
Member Avatar for ArNy

what version of vc++? there's only a dozen or so versinos :) [URL="http://www.pcreview.co.uk/forums/thread-1872166.php"]Here [/URL]is one solution -- I have no idea whether it will work for you or not

Member Avatar for Ancient Dragon
0
160
Member Avatar for himanjim

[QUOTE=~s.o.s~]The above statements is illegal .[/QUOTE] No it isn't illegal --I use similar constructs frequently to copy data from destination to source. Example: [code] char buf1[20]; char* p1 = buf1; char *p2 = "Hello World"; while(*p2) *p1++ = *p2++; *p1 = 0; [/code]

Member Avatar for ~s.o.s~
0
244
Member Avatar for rxgmoral

> <<<<<<<<<<<Dialog.Cpp>>>>>>>> > Preview * p=new Preview(); > p->GetDC()->TextOutW(1,2,_T("rxg")); > i think add char to p; > Debug no Error,but run Error > how to add char to TextOutW function in p > > > sorry,My English isn't good > thank:) after calling new you have to call its Create() …

Member Avatar for Ancient Dragon
0
107
Member Avatar for amelie

Only one object and one thread can write to a file at one time. The reason should be obvious -- if two threads attempt to write to the file at the same time the result will be an unpredictible mixture of the data. You can take at least a couple …

Member Avatar for amelie
0
168
Member Avatar for ze_viru$

speed is sometimes much more important than modularity or maintainability. I worked several years on a program that had to get data real-time from barcode readers on packages as the packages moved along an assembly line. Then the program had to look-up data in a database whose key was the …

Member Avatar for Grunt
0
402
Member Avatar for jazzz

you will have to be a little more specific about the requirements -- a "Dump tool" can mean almost anything. My interpretation would be a program that displays the contents of database tables. Yours might be something else entirely.

Member Avatar for jazzz
0
253
Member Avatar for sgriffiths

just an alternate compare. qsort() doesn't care about actual values, just cares about 0, < 0 or > 0. [code] int compare (const void* source, const void* dest) { return ((List*)source)->value - ((List*)dest)->value; } [/code]

Member Avatar for ~s.o.s~
0
691
Member Avatar for Panda123

If you know how to do file i/o (reads and writes) then the problem is pretty simple. Just open the main file for reading (binary mode) then create a series of small files (open them only one at a time) that will store XXX number of bytes. When the output …

Member Avatar for Ancient Dragon
0
141
Member Avatar for degamer106

I know its possible to write binary files because I've done it hundreds of times, and so has almost everyone else. This works for me. [code] #include <stdio.h> #define MAX 1 typedef struct { short int key; char name[21]; char symbol[6]; float price; float high; float low; short int ratio; …

Member Avatar for degamer106
0
258
Member Avatar for s_nagula

The first place to start your research is probably [URL="http://www.google.com/search?hl=en&sa=X&oi=spell&resnum=0&ct=result&cd=1&q=round+robin+c+program&spell=1"]google[/URL]. It can often find answers to problems quickly, and sometimes not too.

Member Avatar for Ancient Dragon
-1
133
Member Avatar for Gunner54

>>.void WriteMem(DWORD MemOffset, DWORD DataPtr, DWORD dataLen) ;{ remove the period and the semicolon. neither belong there.

Member Avatar for Dave Sinkula
0
582
Member Avatar for joshilay

[QUOTE=joshilay]what are the features of c which are not available in c++ ???[/QUOTE] There are none. some may be implented in C++ a little differently, but they are all there nontheless. For example, c++ requires typecasting when assigning a void* object to some other kind of pointer, C does not …

Member Avatar for Dave Sinkula
0
604
Member Avatar for MikeTiger

read [URL="http://support.microsoft.com/kb/196776/"]this[/URL] article if you don't mind spending a few days learning how to do Office Automation in C++. I understand its easier with .NET but I haven't tried it myself.

Member Avatar for Ancient Dragon
0
184
Member Avatar for Dave Sinkula

[QUOTE=hollystyles]In fact the newbie posters should have the most rep giving power as they're the ones we help the most, not the old hands back slapping each other....although I don't want to put anyone off either.[/QUOTE] how about people with less than 200 posts can give or remove rep? That …

Member Avatar for hollystyles
0
245
Member Avatar for dilip.mathews

who said you can't make a pointer to a reference? [code] void foo(int& x) { int* p = &x; *p = 0; } [/code] If that is not what you mean then please post an example.

Member Avatar for dilip.mathews
0
221

The End.