15,300 Posted Topics
Re: >>1>c:\users\vypr\documents\project0809\Board2.h(19) : error C2061: syntax error : identifier 'boolean' There is no such keyword as [b]boolean[/b] -- its [b]bool[/b] [edit]what ^^^ he said too :) [/edit] | |
Re: [QUOTE=Willco;835816] Is it possible (using VC++6) ...?[/QUOTE] Get a newer compiler. You can download free Microsoft VC++ 2008 Express, but it doesn't do MFC. But it is a lot more compliant with c++ standards than 6.0 version. | |
Re: just do this: [icode]char* res_name[/icode]. But, the trick is that space needs to be allocated before it can be used the first time, such as [icode]res_name = malloc(25);[/icode] initialize it in the do loop [code] do { printf("\nEnter %d res_type:",i+1); [color=red]res[i].res_type = malloc(25);[/color] scanf("%d",&res[i].res_type); [/code] | |
Re: See the man pages spawn() family of functions. | |
Re: It might depend on the compiler -- Microsoft eVC++ for PocketPC contains an emulator. What compiler are you using? | |
Re: >>I think the problem is I am adding it to a Vector of StaffMember objects. Staff Member is the base class, so would case the derived classes into StaffMember objects? Simple: [code] #include <iostream> #include <vector> using namespace std; class Base { public: Base() {x = 0;} virtual void Display()= … | |
Re: how about using a function (Warning! not compiled or tested.) [code] bool IsInArray(const char array[], int size, const char* search) { bool found = true; for(int i = 0; i < size; i++) { if( strcmp( array[i], search) == 0) { found = true; break; } } return found; } … | |
Re: you are not supposed to use the value of an array element in the for loop condition, but use the max number of elements in the loop, something like this: [code] for (j = 0; j < 10; j++){ [/code] | |
Re: did you try this: [icode]double bat::travel_time (double distance, terrain_type t) [/icode] | |
Re: [QUOTE=CPPRULZ;835951] When would you use string vs. char arrays?[/QUOTE] Almost always, unless you are instructed to use character arrays. When you are taking a course in c++ language your instructor may require you to use character arrays for the educational value of learning how to use them. | |
Re: tutorials -- no such thing. you just have to study the hardware specifications because each is different. And embedded c language may be slightly different from ansi c because of hardware limitations. If you want to program for WinCE or Windows 5.0 Mobile then there's a fair amount of documentation … | |
Re: Does he give you good grades? If he does, then you are probably heading in the right direction. Listen to his criticisms and learn how to do better the next time. If your school offers a course in logic, then take it. Also take all the math courses you can … | |
Re: Huh? Just sum up the clock cycles you posted, but that does not include the time printf() function takes. If you want a better way to profile your program, use clock() function which return time_t object [code] int main() { clock_t t1, t2; t1 = clock(); // put your code … | |
Re: [QUOTE=pandey;37690] Bug I ma getting is thses error which i am not able to solve out. Can anyone help me. thsnks.[/QUOTE] What are the error message(s)? | |
Re: >>please make it snapy That little remark will certainly get your thread ignored by everyone, including me. Your deadline is not our problem. | |
Re: I have 64-bit Vista Home Prem and was using IE7, which is the default for Vista. But it had problems locking up while surfing the web, so I installed Firefox (32-bit version). I have not had any problems at all with it. I'm now installing AdBlock Plus per your recommendation. | |
Re: narrow it down for us by posting only what you tried to do but failed. I don't have the time to read that entire program to figure out what you are talking about. | |
Re: >>DWT 5/3 and 9/7. I have no clue what that is :) Maybe you should ask that question in [URL="http://www.mathworks.com/matlabcentral/newsreader/"]their newsgroup[/URL] | |
Re: line 20: you need to use two '' folder separator characters so that the compiler doesn't treat them as escape characters [icode]spInventRep = fopen("C:\\Users\\Jenniy\\Desktop\\ch 7\\inventory09.txt", "r");[/icode] line 22: you can not use the same FILE pointer for both input and output files -- use two different names. line 36: use … | |
Re: The only mobile applications I have written are in c++ and run on a barcode scanner handheld computer from Symbols Technologies. The program was written in c++ using Microsoft Visual C++ 2005 and Mobile 5.0 operating system on the scanner. But for you to do something like that would cost … | |
Re: Get input as a string, not an int, so that the loop can easily test for on-numeric characters and act accordingly. | |
Re: >>don't think you can't assign values to functions/methods. That is how to create a [b]pure virtual function[/b] [quote][URL="http://en.wikipedia.org/wiki/Virtual_function#Abstract_classes_and_pure_virtual_functions"]A pure virtual function or pure virtual method is a virtual function that is required to be implemented by a derived class that is not abstract. Classes containing pure virtual methods are termed … | |
Re: I just read that Dani was doing some server maintenance this morning -- that might have temporarily caused the problem. | |
Re: >>but I haven't the faintest clue what class base& b= d; means It means b is a reference to d -- in otherwords both b and d are two different names for the same object. | |
Re: I'm not sure what you are asking. Do you need to save the ages for later? If not, then you don't need arrays [code] ifstream in("filename.txt"); std::string name; std::string grade; int age; while( in >> name >> grade >> age ) { if(age > 50) cout << "Group 4"; else … | |
Re: This works great for me, using VC++ 2008 Express [code] #include "stdafx.h" #include <iostream> #include <vector> #include <cmath> using namespace std; int main(int argc, char* argv[]) { std::vector<int> truth_table; std::vector<vector<int> > truth_table_col; double no_of_twos = 7; double base_two = 2; cout << "No of 2's = " << no_of_twos << … | |
Re: This is c++, not C, so just use the std::string + operator to concantinate strings [code] std::string areaCode = "999"; std::string prefix = "555"; std::string number = "1212"; std::string result = areaCode + " " + prefix + "-" + number; [/code] If you have to use character arrays then … | |
Re: [QUOTE=joshSCH;394071](smoking!=party animal)[/QUOTE] That's wrong for two reasons 1. Humans are 100% animal, there's no "partly" about it. 2. I have never seen another creature on this planet who smoked. Humans are the only creatures that do it, and we are supposed to be intellectually superior to all others :-O | |
Re: One program -- one computer -- one CPU. One program can not run across multiple computers like you describe. If the computer has multiple cores then the operating system might distribute the threads among the cores, but it will not distribute threads across computers. There might be special add-on kernel-level … | |
Re: [URL="http://www.plagiarism.com/"]have you read this?[/URL] | |
Re: >>I forgot how to make it so when i type something and press enter, it displays what i wanted it to. use cin to get keyboard input [code] int price; cout << "Enter price of house\n"; cin >> price; cout << "The price you entered is " << price << … | |
Re: Is this supposed to be C, not C++? I question this because of [icode]int isempty(queue &q)[/icode] -- the parameter looks like a c++ reference. Is that supposed to be circular queue where the front and back variables wrap around to 0 then the buffer [b]items[/b] is filled up? If yes … | |
Re: As Narue said, using externs can become a real nightmare for program maintenance by either you or someone else. I recall some 20+ years ago I was hired onto a new job and someone had written a C program that was about 15-20 *.c files, each file declared several global … | |
Re: It's not possible. But you might put the managed code in a dll or static library. | |
Re: [URL="http://lmgtfy.com/?q=c%2B%2B+xml+parser"]start here[/URL] | |
Re: Ohhh that requires a Quick Time plugin that I don't have, and can't install. | |
Re: since you didn't post it I have no clue. >>could you explain how this works when executed in C? #define's are NOT executed at all in C. The compiler's preprocessor expands all #defines and #includes before the compiler sees the code. If this doesn't explain what you want, then you … | |
Re: QT and wxWidgets are also somewhat platform independent. | |
Re: Auditory : 56% Visual : 43% Left : 52% Right : 47% [b][i]Now nobody can say I'm not level headed :) [/i][/b] Ancient, your hemispheric dominance is equally divided between left and right brain, while you show a moderate preference for auditory versus visual learning, signs of a balanced and … | |
Re: >>int numcols = 11; >> char line1[numcols], line2[numcols]; Does that even compile for you ? | |
Re: Put $1,000,000.00 USD in my paypal account and I'll write it for you. If you can't afford that, then you will just have to post what you have done and ask questions about parts you don't understand. Sorry, but no freebies here. | |
Re: There are thousands of examples posted here -- just read some of these threads and attempt to solve the programs yourself. | |
Re: >>I tried writing some code for this, but am having way to many issues please post code, and use code tags as described in the links in my signature below. | |
Re: Temp is an unitialized and unallocated pointer. See the two lines I changed below [code] void Deque::Addfront(int n) { Temp = new node; // <<<< Here Temp->value=n; if (front==NULL) { Temp->link=front; front=back=Temp; } else { Temp->link=front; front = Temp; // <<<< here } return; } [/code] | |
Re: lines 17 thru 19 looks like a data object because of the brackets [ and ]. Replace them with parentheses ( and ) to make it a function call. Also note that buildAr() takes 3 parameters, not one. So you can consolidate lines 17-19 into just one line:[icode]buildAr(zip, pgmavg, testavg);[/icode] | |
Re: C and C++ do not support joysticks or mice (mouses??) There is no simple solution and any solution must use os-specific api functions. DirectX, DirectDraw, etc are complicated and not for beginners. If you search [URL="http://www.google.com/search?hl=en&q=joystick+device+driver&btnG=Google+Search"]google[/URL] you might find a useful device driver for your program. | |
Re: you need to create a loop and ask the the 10 numbers one at a time [code] for(int i = 0; i < 10; i++) { cout << "Enter number #" << i+1 << "\n"; cin >> num; list.push_back(num); } [/code] | |
Re: You can't get much better than [URL="http://lmgtfy.com/?q=winsock+tutorials"]these tutorials.[/URL]. If you don't understand them then maybe you are not ready yet for socket and network/internet programming. |
The End.