15,300 Posted Topics

Member Avatar for Rosicky

if you don't know where to start, here's a hint [code] int main() { // put your code here } [/code]

Member Avatar for ~s.o.s~
0
148
Member Avatar for comp_sci11

[QUOTE=comp_sci11]i'm using a borland turbo C[/QUOTE] That's your first big mistake! toss that crappy compiler into the bit bucket (delete it from your computer) and get a modern C compiler that you can use to learn the C and C++ languages correctly. You can't learn to drive a 2007 automobile …

Member Avatar for Ancient Dragon
0
155
Member Avatar for MrAdam

>>What is the best way to go about getting into this field? get a college degree in computer science or some related field. competition is fierce today and you need all the edge you can get. At your age and with a young family to support that is going to …

Member Avatar for hollystyles
0
142
Member Avatar for steve_randle

You are writing a c++ program, don't the input string to char* -- just use std::string's == operator (and don't use the variable name "string" because it is the name of a c++ class and will confuse the compiler. I don't know the relevance of i, but that is probably …

Member Avatar for steve_randle
0
148
Member Avatar for Ancient Dragon

any plans to actuvate rep power, like you see on many other boards such as [URL="http://www.codeguru.com/forum/showthread.php?t=395306"]this[/URL] one?

Member Avatar for Dave Sinkula
1
95
Member Avatar for bkelly

you could use fwrite() assuming Port_Handle is the handle to an open file. -- see C docs for description of that function.

Member Avatar for Dave Sinkula
0
292
Member Avatar for scharan

[QUOTE=scharan]Hi all, This is charan new member of this team. Iam having one Question to all of you What is the difference between static and dynamic Dll and how the mechanisim of static dll goes in VC++ [/QUOTE] The terms static and dynamic do not describe the features of a …

Member Avatar for Ancient Dragon
0
196
Member Avatar for comp_sci11

[QUOTE=comp_sci11]can someone help me about creating a window in turbo c?? because i can't find anything about creating a window in turbo c! is there a site explaining or about creating a window in turbo c??[/QUOTE] That's because you can't do it with that compiler -- Turbo C is just …

Member Avatar for Ancient Dragon
0
176
Member Avatar for MitchellH

[URL="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vctutor98/HTML/_gs_scribble_tutorial.asp"]Scribble tutorial [/URL]is the only one I know of. There are several books at your local book store or [url]www.amazon.com[/url].

Member Avatar for Eddy Dean
0
84
Member Avatar for rxgmoral

The main program cannot access controls in CmEdit class directly because they do not exist at the time you are attempting to access them. CDialog does not initialize the controls until OnInitDialog() is called, which is after DoModal(), and it destroys the controls when the CDialog returns from DoModal() (assuming …

Member Avatar for Ancient Dragon
0
116
Member Avatar for comp_sci11

your program should be passing the structure aboud to other functions by reference instead of by value so that any changes made by the function will be made to the original copy of the structure. When you pass a structure by value the program must make a copy of the …

Member Avatar for Ancient Dragon
0
279
Member Avatar for chaosfromthesky

If you have the Express edition of that compiler you will also have to download the Windows Platform SDK because the compiler is pretty minimal. It says its for M$ Windows 2000 Server but it works that that compiler and XP too. I think there is a link to it …

Member Avatar for Ancient Dragon
0
127
Member Avatar for hiphoprules

since the lines have variable number of entries fscanf() will be little use because it requires fixed length number of entries on the line. Instead, use fgets() to read the entire line into memory than parse for spaces and assign to approirate members of the structure. you can use either …

Member Avatar for Dave Sinkula
0
155
Member Avatar for anyone
Member Avatar for Salem
0
109
Member Avatar for portege

windows api will return the x,y coordinates of the mouse. If you know the coordinates of the image's bounding rectangle then you just need to find out which image rectangle contains the mouse coordinates. Using MFC will simplify that, but you can also use windows RECT structure and write your …

Member Avatar for Dave Sinkula
0
4K
Member Avatar for saman

attempt to open it with fopen() or ifstream::open(), depending on C or C++ program.

Member Avatar for ~s.o.s~
0
199
Member Avatar for rdubey_jsr

here is a pure c++ version that replaces the C-style char array with std::string and removes the tmp variable altogether. From the looks of this function it must be just a code snippet of a larger more complex function, is that right? If it isn't, then you can remove vector …

Member Avatar for WolfPack
1
290
Member Avatar for alvin_aldrich

>>printf("table 1 is %d\n", table_1); That only prints the memory address of the beginning of table_1, which is an array of binary data. I have no idea what is stored in that array, you might get an idea from the program that contains the array.

Member Avatar for hollystyles
0
163
Member Avatar for lewisy

LogonUser() will allow you to log onto the computer if you know a valid user name and password. There are no functions to retrieve the password of a given user -- it would be a huge security violation if there was such a function.

Member Avatar for lewisy
0
224
Member Avatar for L33VaNcL33F

You can find two tutorials [URL="http://www.relisoft.com/Win32/generic.html"]here[/URL] and [URL="http://www.winprog.org/tutorial/"]here[/URL]

Member Avatar for mostafadotnet
0
2K
Member Avatar for djkross

post your code using std::string because it does work with that. replace strstr() with the std::string's find() method, like this [code] for(int i=0; i<20; i++) { if( data[i].find(search) == string::npos ) cout << "NO MATCH" << endl; else { cout << data[i] << endl; incVar++; } } [/code]

Member Avatar for djkross
0
250
Member Avatar for balachandu

unless you just happen to have the source code for notepad and MSWord (which is not very likely), the first two questions are nonsense and unanswerable unless they are answered in the text book where you got those screwy questions. I don't know the answer to 3.

Member Avatar for dilip.mathews
0
148
Member Avatar for shwetashelke

ODBC is the most common way to access SQL databases. Search google for ODBC and you will find some c++ classes. Example [URL="http://www.codeproject.com/database/DataLayer.asp"]here[/URL] and [URL="http://www.codeproject.com/database/#ODBC"]here[/URL]

Member Avatar for Dave Sinkula
0
140
Member Avatar for slacke

why don't you make i a local variable and function() return its value. [code] #includes.... int function() { [color=red] int i = 0; [/color] while(charbuff[i]!=' ') { ofstream stream("file.lng", ios::app) stream << charbuff[i]; i++; stream.close(); } [color=red]return i;[/color] } main() { ........... some code [color=red] int i = [/color]function(); /*call …

Member Avatar for slacke
0
167
Member Avatar for ranaz

[URL="http://www.emsps.com/oldtools/mscpp.htm#vcpp15"]Here[/URL] seems to be a source where you can get that compiler. I don't know if that link is still any good.

Member Avatar for Ancient Dragon
0
164
Member Avatar for tefflox

there are two ways to declare a one-dimentional array (1)??? calculateEarned(worker array[]); and (2)??? calculateEarned(worker * array); but there is only one way to declare the return value, using a pointer to the beginning of the array. worker* calculateEarned(worker []);

Member Avatar for tefflox
0
130
Member Avatar for ishwar

you can google for cgi programs. [URL="http://cgi.resourceindex.com/"]Here[/URL] is one suggestion.

Member Avatar for Dave Sinkula
0
134
Member Avatar for gampalu

allocate the array with either malloc() or new, depending on whether you are writing a c or c++ program.

Member Avatar for gampalu
0
207
Member Avatar for caspiku
Member Avatar for CrazyDieter

why do you think that registry key is going to launch mydll.dll every time a program is run? I tried it on my XP computer and it does nothing too.

Member Avatar for Eddy Dean
0
664
Member Avatar for comp_sci11

what compiler are you using? my guess is Turbo C, but I could easily be wrong. As for unused variables -- just delete them from the program. >> strcpy(fn[p],fn); fn is a character array, fn[p] is a single character somewhere in that array. strcpy() expects the first parameter to be …

Member Avatar for comp_sci11
0
152
Member Avatar for muthuivs

use FindFirstFile() and FindNextFile() to loop through all the files in a directory. Search MSDN and you will find some examples.

Member Avatar for GloriousEremite
0
398
Member Avatar for aeinstein

[rant]flow charts are evil little critters and should be banned from all educational institutions. I've never seen anyone create or use them outside the university. And most programming books don't even talk about them.[/rant]

Member Avatar for iamthwee
0
363
Member Avatar for -jOHn BeneDict-

I can't help you with the math (have no clue what a quetelet is) but you will need to add a getch() immediately following that scanf() to remove the <Enter> key from the keyboard buffer. scanf() does not do that for you.

Member Avatar for Zababa
0
135
Member Avatar for jatinder kumar
Member Avatar for amitkumar2982

you can't use flat memory model in real mode because segmentation is different. You can use a dos extender, such as Pharlap, that switches back and forth between real and protected mode, but your flat memory model program runs in protected mode, not real mode. The dos extender switches to …

Member Avatar for Dave Sinkula
0
238
Member Avatar for joshilay

there is nothing wrong with your compiler. It does not work as you expect because the code you posted as undefined behavior.

Member Avatar for joshilay
0
193
Member Avatar for priya_2006g

Most common way to connect to any database is via [URL="http://www.google.com/search?hl=en&sa=X&oi=spell&resnum=0&ct=result&cd=1&q=ODBC+c%2B%2B+class&spell=1"]ODBC[/URL]. Here are some [URL="http://www.google.com/search?hl=en&lr=&q=ODBC+tutorial&btnG=Search"]tutorials[/URL].

Member Avatar for priya_2006g
0
249
Member Avatar for sgriffiths

how is update_record defined? It would appear to be a structure, not a simple string as you illustrated. We need more information to help you.

Member Avatar for sgriffiths
0
163
Member Avatar for uxohus2b

what operating system? MS-Windows? use FindFirstFile() and FindNextFile() to get a list of all the files in dir A, store the filenames in a string array. Then use the same functions to get the files in directory B. For each file in B search the array of filenames you created …

Member Avatar for uxohus2b
0
105
Member Avatar for winbatch

If the file is pretty much static (doesn't change very often) then you can create an index file that contains just the offsets into the master data file of the beginning of each record. Then when you want to read the 50th string just read the offset in the 50th …

Member Avatar for Ancient Dragon
1
221
Member Avatar for mrjaiswal

Unfortunately there is no standard c or c++ way to accomplish that. So you have to resort to some non-standard functions that you compiler may support, such as those in conio.h. I believe the functions in that header file were originally developed by Borland for their Turbo C compiler, but …

Member Avatar for spaceboyz87
0
193
Member Avatar for slacke

1. it is not necessary to specify ios::in for ifstream, that is what ifstream does anyway. 2. use std::string's c_str() method when passing it to the constructor ifstream openfl(file.c_str()) 3. cin >> file; This construct will work as long as there are no spaces in the filename and optional path. …

Member Avatar for Dave Sinkula
0
101
Member Avatar for squirrel

I hope this is an old program you have that you need to change because it is written in ancient original K&R style. There are several changes you have to make -- and below may or may not be all of them (1) change [b] if(argc != 2)[/b] to [b] …

Member Avatar for squirrel
0
259
Member Avatar for dev.cplusplus

The function that callers ConvertToChar() must delete the memory when done with it. That's a common requirement of programming. Of course you could also return std::string instead of char* which would eliminate the need for allocation -- but if this is for eVC++ compiler you won't have that option. A …

Member Avatar for Ancient Dragon
0
168
Member Avatar for Dani

is it possible to have 5 stars but a rep power of only one green square thingy?

Member Avatar for WolfPack
0
342
Member Avatar for Lun
Member Avatar for HelmsK85

You will probably get NO useful responses by spamming this board with your homework assignments. Since you did not as a question I suppose you expect somebody to do the work for you.

Member Avatar for Dave Sinkula
0
206
Member Avatar for Ace01000

>> cin << math_operator; you used the output operator, not input. You meant this: cin >> math_operator; >> case 's': main() Not allowed to call function main() in either c or c++. You will have to think of a different way to restart the program.

Member Avatar for Ancient Dragon
0
128
Member Avatar for ~s.o.s~

>>Can you please modify the code so ... No, I don't do homework for anyone. >> s = malloc(sizeof(char)); This just allocates one character, causing a 1 byte memory leak on every loop iteration. >> s[index] = inputBuffer; Since the malloc allocates only one character, this line will just scribble …

Member Avatar for Ancient Dragon
0
169

The End.