15,300 Posted Topics

Member Avatar for Acidburn

assume you used ClassWizard to name the button control m_ctrlButton, [code] m_ctrlButton.EnableWindow(FALSE); // grey (disable) the button [/code]

Member Avatar for Ancient Dragon
0
139
Member Avatar for P.Kulkes

maybe its a virus or something like that?? I have no such file on my computer and I have Visual C++ 2005 Pro and VC++ 6.0 installed. Is your computer setup to be an e-mail server or web server (mine is NOT)? If not, then move the file someplace else …

Member Avatar for alc6379
1
260
Member Avatar for axiss

[QUOTE=axiss]Hi I was just wondering how you change the text colour of only some of the text in a console when you are using cout to display your text.[/quote] it will all depend on the operating system. MS-Windows, use win32 api console functions. I don't know about *nix but probably …

Member Avatar for Ancient Dragon
0
240
Member Avatar for Acidburn

[URL="http://www.winprog.org/tutorial/"]This[/URL] is a good tutorial about how to write non-MFC programs. It shows you how to create dialog boxes from scratch. You could integrate some of it into an MFC program if you want. And [URL="http://www.codeproject.com/dialog/xmessagebox.asp"]here[/URL] is a good non-MFC XMessageBox that can be easily added to an MFC program …

Member Avatar for Ancient Dragon
0
99
Member Avatar for qljolly

>> if(Board[row][cur_col] == Board[row + 1][cur_col- 1] && Board[row + 1][cur_col - 1] == Board[row + 2][cur_col - 2] && Board[row + 2][cur_col - 2] == Board[row + 3][cur_col - 3]) when row == 5 the above causes exception because Board[row+1] is illegal cell reference. I responded with 1 to …

Member Avatar for Ancient Dragon
0
445
Member Avatar for avalloc

>> while (reply,reply1,reply2,reply3,reply4!= "no") that is not necessary. just create a for loop that counts from 0 to 5 -- no need to answer that question 5 times [code] for(int count = 0; count < 5; count++) { // blabla } [/code] there is no need for num1, num2 ... …

Member Avatar for Ancient Dragon
0
126
Member Avatar for Acidburn

your program has corrupted the stack someplace -- most likely buffer overflow or possibly use of uninitialized pointers. Its impossible to diagnose without seeing the entire program. I would probably start debugging by commenting out huge blocks of code until the problem goes away. Then you will know approximately where …

Member Avatar for Ancient Dragon
0
99
Member Avatar for DotNetUser

I do similar, but I put that log function in another thread so that it doesn't slow down other processing. you can put the log requests into a queue, then the log function can take its own sweet time processing them. Also, I always close the file when the last …

Member Avatar for Ancient Dragon
0
133
Member Avatar for ghadahelal

Yes, it can be done with c++, but it's a pretty complex and very very messy -- see this about [URL="http://support.microsoft.com/?scid=http%3a%2f%2fwww.support.microsoft.com%2fkb%2f196776%2f"]Office Automation[/URL]

Member Avatar for Ancient Dragon
0
212
Member Avatar for Dani

how long is this going to go on anyway? I still cannot access it from IE6 -- Firefox works ok.

Member Avatar for The Dude
0
363
Member Avatar for Tester99

>> any suggestions upgrade to [URL="http://msdn.microsoft.com/visualc/vctoolkit2003/"]Visual C++ 2005 Express[/URL]

Member Avatar for WolfPack
0
236
Member Avatar for Roujin

>>Visual C++ 1.52, I am trying to teach myself programming well, you won't learn much by using that ancient compiler, and what you do learn will most likely be wrong. Get yourself a modern compiler -- there are several free ones that are good for learning, such as Dev-C++ from …

Member Avatar for WolfPack
0
257
Member Avatar for YoTaMiX

why doesn't hw2head.c contain any includes? Add hw2head.h to the top of hw2head.c and that will probably fix all (or most) of the problems.

Member Avatar for Ancient Dragon
0
144
Member Avatar for YoTaMiX

In function input_university() I see where scanf() is reading the string, and univ->std[num_cells].name is getting allocated, but I don't see where it is copying buffer to univ->std[num_cells].name after allocation. Add this and it will probably work ok. [code] strcpy(univ->std[num_cells].name,buffer); [/code]

Member Avatar for YoTaMiX
0
229
Member Avatar for lsu420luv

[QUOTE=lsu420luv]I need to pull the Any Name Here into a variable and then use my usual[/QUOTE] the >> insert operator stops reading the keyboard when it encounters the first space. If you want the string to include spaces, then use getlin() [code] std::string full_name; getline(cin,full_name); [/code] >> Also if I …

Member Avatar for lsu420luv
0
268
Member Avatar for pjoseph24

>>any suggestions 1. you can use ODBC, this is the oldest and most popular method of acccessing SQL databases. Just use google and you will find free c++ classes and instructions. 2. review the Enroll tutorial at [url]www.microsoft.com[/url] -- it uses MFC which you might or might not want. If …

Member Avatar for Ancient Dragon
0
105
Member Avatar for Ancient Dragon

The "Insert Link" button normally presents two dialogs -- one to enter some text and the other for the url. It doesn't do that any more -- only asks for the url. Will you please fix this:?:

Member Avatar for Dani
0
198
Member Avatar for remedius

What compiler/version are you using? I have had warning C4530 with winCE and solved the problem by adding -GX to the compile flags. [URL="http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=195818&SiteID=1"]http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=195818&SiteID=1[/URL]

Member Avatar for remedius
0
346
Member Avatar for amnezia

You could try to use [URL=http://www.google.com/search?hl=en&q=quadratic+equation+computer+programs&btnG=Google+Search]Google[/URL]

Member Avatar for SpS
0
1K
Member Avatar for thare

MS-DOS became extinct after version 6.X. If you have MS-Windows installed on your computer than you do NOT have MS-DOS. You probably mean a command-line window, which is an MS-DOS [b]emulator[/b]

Member Avatar for thare
0
128
Member Avatar for ghadahelal

in MS-Windows you can call win32 api function GetSystemTime() that returns a [URL="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sysinfo/base/systemtime_str.asp"]SYSTEMTIME[/URL] structure. Other operating systems probably have something similar, but I don't know what they would be.

Member Avatar for Ancient Dragon
0
173
Member Avatar for turkish_girl

did you bother reading [URL=http://www.daniweb.com/techtalkforums/thread43355.html]this thread[/URL] ? Its nearly identical assignment -- in fact that poster could also be in your class! I have already done that assignment in C and C++, but I'm not about to post the results -- wouldn't want to spoil your fun :mrgreen: I did …

Member Avatar for Ancient Dragon
0
108
Member Avatar for a.baki

first find out how many words are on the line, count the length of all the words. subtract that from the total line length and you get the number of spaces that you have to distribute between the words. divide that number by the number of words and you get …

Member Avatar for a.baki
0
367
Member Avatar for tuannie

One problem is that you are attempting to open the same file twice -- once in main() and again in Checkfile(). After opening the file in main() just pass the ifstream object to Checkfile. [code] while (!openfile.eof() && Record < ArrayRecord && !openfile.fail()) { //While loop, As long as the …

Member Avatar for Ancient Dragon
0
158
Member Avatar for NarenderKumarP

>>Following code gives me an error when I use text field in CSV file instead of float or integer fields what compiler? post the errors. The compiler should give you warnings that it is converting int to char and may lose data. what does the csv file look like -- …

Member Avatar for NarenderKumarP
0
386
Member Avatar for chelo77

>fstats[index value]++, now i'm just using pointers how would i do this?? I thought `*(fstats +1)++` would increment the second position of `fstats` array because `fstats` points to the first postion but syntax wise this does not work. I am currently placing the certain index value accrodingly, kinda like cheating. …

Member Avatar for Ancient Dragon
0
68
Member Avatar for mwo0002
Member Avatar for chuckrac
Member Avatar for smazherhq

I really don't know the answer, but I would start [URL=http://www.microsoft.com/technet/prodtechnol/winxppro/plan/rtcprot.mspx]here[/URL]

Member Avatar for Ancient Dragon
0
81
Member Avatar for kaun

what keyboard language is installed on your computer? UK and American keyboards are different scancodes for the same key. American keyboard prints '#' for the Shift-3 key, while UK prints ' £'

Member Avatar for Narue
0
715
Member Avatar for Dj Enjoi

use the chdir() function instead of the system() because (1) its faster and (2) its safer [code] chdir("c:\\"); [/code]

Member Avatar for iamthwee
0
108
Member Avatar for jto

If you want it ported to MS-Access or Oracle you will have to use their database engine to import the file into the database tables. Each database has its own unique file formats so the safest way to do it is to use the appropriate database engine. And some cost …

Member Avatar for Ancient Dragon
0
167
Member Avatar for kevjeffers

you forgot to include the header file in the *.cpp file. You may also need other header files too, such as iostream, fstream, string, etc. depending on your code. [code] #include "dateSType.h" // rest of cpp code here [/code]

Member Avatar for kevjeffers
0
107
Member Avatar for ZenaNqld

you forgot to block in the code for the last if statement. [code] if (StrokeCount > 5 ) [color=red] { [/color] Par = StrokeCount%5; cout <<" You are "<< Par <<" over Par" << endl; cout << endl; [color=red] } [/color] [/code]

Member Avatar for WolfPack
0
89
Member Avatar for chelo77

>>string[strlen(string)] = '\0'; That may or may not work -- if the string does not contain '\n' the above will cut off the last character that was read. fgets() appends the '\n' ONLY if there is one in the stream -- for example if the buffer is filled up before …

Member Avatar for Ancient Dragon
0
156
Member Avatar for Podge

I prefer MFC only because I fairly well versed in it -- and because, like an old dog, its difficult to learn new tricks. But for younger people, learn about MFC only because there is a lot of code out there that you may encounter on-the-job. New projects would probably …

Member Avatar for eggsy84
0
320
Member Avatar for Aldin

here is a c++ version that puts the strings into a 2d vector [code] #pragma warning(disable: 4786) // VC++ 6.0 disable warning about debug line too long #include <iostream> #include <fstream> #include <vector> #include <string> using namespace std; typedef vector<string> LINE; int main() { string line; int pos; vector<LINE> array; …

Member Avatar for Ancient Dragon
0
2K
Member Avatar for Ancient Dragon

I couldn't access it all day today from where I work using IE6. Kept getting a strange error (I don't recall what it said). But at home using FireFox it was ok. Coincidence??

Member Avatar for WolfPack
0
88
Member Avatar for fiska

>>I've tried the same with my VS 2005 but I didn't worked! I was misssing this .lib file that compiler will not generate a .lib file unless there are some exported symbols (either functions and/or objects). __declspec( dllexport ) will export them [code] __declspec( dllexport ) int foo; [/code] >>what …

Member Avatar for fiska
0
291
Member Avatar for Tiffiney_v24

>>int _tmain(int argc, _TCHAR* argv[]); remove the semicolon at the end of that line

Member Avatar for Ancient Dragon
0
125
Member Avatar for iamboredguy

>> if (n<1 || n>256) your array is only 10 rows and columns. If I enter a value of 255 then your program will crash bigtime. Instead of hard-coding a value like 256, create a define or const int to declare the array size and its limits [code] const int …

Member Avatar for iamboredguy
0
199
Member Avatar for princess_lia

your do-while loop is wrong. It doesn't even compile so I'm not supprised it has runtime errors. [code] do { strcpy (sDirName, TEXT(" -i 264\\")); lstrcpy(sFileName,FindFileData.cFileName ); strcat(sDirName,sFileName); // other stuff here } while( FindNextFile(hSearch,&FindFileData) != 0); [/code] fix that and it works.

Member Avatar for Ancient Dragon
0
285
Member Avatar for lsu420luv

So, according to your description Player ID = 6010 Proficiency Level = 1 Weight Factor = 1.3 Judge = 23 Score = 7.0 Then the next set is Player ID = 25 Proficiency Level = 8.5 Weight Factor = 34 Judge = 7.0 Score = 12 That doesn't look right …

Member Avatar for Lerner
0
667
Member Avatar for degamer106

you are attempting to use c++ techniques on C strings. use strcpy() to copy one string to another [code] char tmp[LEN]; strcpy(tmp, flight[i].first); [/code] However, that is not really what you want to do anyway -- it takes to much time to swap individual members of a structure. You want …

Member Avatar for Micko
0
210
Member Avatar for janito2008

why are year, month and day doubles? why not int or long? if you use the functions in <ctime> it would make your class a lot smarter -- for example the formatting you desire can be easily accomplished with strftime(). Once you know year, month and day, fill in a …

Member Avatar for Ancient Dragon
0
160
Member Avatar for HelpMeImLost

There are lots of ways to do it, here is just one of them. The class will need public access to the private variables only if something outside the class needs access to those variables, and that's the purpose of the Get() and Set() methods. [code] #include<iostream> using namespace std; …

Member Avatar for HelpMeImLost
0
113
Member Avatar for la_scala

The functions in conio.h are non-standard and not supported by very many compilers. Just a warning because your teacher may not be able to compile your program if he/she uses a compiler that does not support those functions. Most new programmers should not use them so that you learn the …

Member Avatar for Ancient Dragon
0
94
Member Avatar for Saint48198

Did you post your exact program? Because the code you posted doesn't fit the results you posted. >>inFile >> fName >> lName[i++] >> age >> sex >> wTime; lName array is ok, but on every iteration of that loop the program just simply overwrites whatever was read on the previous …

Member Avatar for Saint48198
0
170
Member Avatar for jax_123

in MS-Windows NT/W2K/XP, cmd.exe is the shell emulator, Win95/98 it was (is) command.com. So if you want to lock out the command prompt you will have to write your own version of either cmd.exe or command.com. It would require a firm understanding of C language and win32 api functions to …

Member Avatar for Ancient Dragon
0
77
Member Avatar for Asif_NSU

On MS-Windows, use FindFirstFile() and FindNextFile(). There are lots of examples how to use those two functions floating around, just use google to search for them. >>I cannot use win32 because the program would be used as an example in a class introducing the C programming language How to get …

Member Avatar for Ancient Dragon
1
263

The End.