15,300 Posted Topics

Member Avatar for DanielB2

>>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]

Member Avatar for Ancient Dragon
0
219
Member Avatar for Willco

[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.

Member Avatar for NicAx64
0
167
Member Avatar for metal_butterfly

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]

Member Avatar for metal_butterfly
0
143
Member Avatar for darkagn
Member Avatar for metal_butterfly
Member Avatar for LiBOC

It might depend on the compiler -- Microsoft eVC++ for PocketPC contains an emulator. What compiler are you using?

Member Avatar for Ancient Dragon
0
142
Member Avatar for AnGuRuSO

>>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()= …

Member Avatar for AnGuRuSO
0
883
Member Avatar for psankisa

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; } …

Member Avatar for Intrade
0
126
Member Avatar for austinslik

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]

Member Avatar for austinslik
0
122
Member Avatar for danielle23

did you try this: [icode]double bat::travel_time (double distance, terrain_type t) [/icode]

Member Avatar for danielle23
0
237
Member Avatar for CPPRULZ

[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.

Member Avatar for Ancient Dragon
0
128
Member Avatar for dayalsaran

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 …

Member Avatar for LiBOC
0
102
Member Avatar for epan

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 …

Member Avatar for epan
0
188
Member Avatar for sarawilliam

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 …

Member Avatar for Ancient Dragon
0
812
Member Avatar for pandey

[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)?

Member Avatar for Ancient Dragon
0
119
Member Avatar for shevy24

>>please make it snapy That little remark will certainly get your thread ignored by everyone, including me. Your deadline is not our problem.

Member Avatar for shevy24
0
51
Member Avatar for Stylish

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.

Member Avatar for Ancient Dragon
0
165
Member Avatar for vijaysoft1

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.

Member Avatar for Lerner
0
107
Member Avatar for pridathabah

>>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]

Member Avatar for Ancient Dragon
0
81
Member Avatar for BunnysMom

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 …

Member Avatar for Aia
0
182
Member Avatar for Kecy

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 …

Member Avatar for Ancient Dragon
0
82
Member Avatar for drxs33

Get input as a string, not an int, so that the loop can easily test for on-numeric characters and act accordingly.

Member Avatar for Aia
0
78
Member Avatar for eduardocoelho

>>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 …

Member Avatar for ArkM
0
232
Member Avatar for lllllIllIlllI

I just read that Dani was doing some server maintenance this morning -- that might have temporarily caused the problem.

Member Avatar for MidiMagic
0
177
Member Avatar for CPPRULZ

>>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.

Member Avatar for CPPRULZ
0
128
Member Avatar for Technosapo

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 …

Member Avatar for Ancient Dragon
0
127
Member Avatar for guest7

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 << …

Member Avatar for guest7
0
102
Member Avatar for iTsweetie

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 …

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

[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

Member Avatar for jbennet
0
4K
Member Avatar for lehe

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 …

Member Avatar for tux4life
0
88
Member Avatar for drjay1627
Member Avatar for tux4life
0
104
Member Avatar for Cyken

>>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 << …

Member Avatar for Cyken
0
113
Member Avatar for vartikachandra

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 …

Member Avatar for vartikachandra
0
305
Member Avatar for theories

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 …

Member Avatar for ArkM
0
87
Member Avatar for Nemoticchigga

It's not possible. But you might put the managed code in a dll or static library.

Member Avatar for Ancient Dragon
0
92
Member Avatar for woe joy
Member Avatar for Ancient Dragon
0
33
Member Avatar for The Dude
Member Avatar for jbennet
0
126
Member Avatar for sanctuary

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 …

Member Avatar for Ancient Dragon
0
90
Member Avatar for Zcool31
Member Avatar for The Dude

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 …

Member Avatar for chriswellings
0
275
Member Avatar for guest7

>>int numcols = 11; >> char line1[numcols], line2[numcols]; Does that even compile for you ?

Member Avatar for MrSpigot
0
95
Member Avatar for zaohin

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.

Member Avatar for ithelp
0
104
Member Avatar for massivefermion

There are thousands of examples posted here -- just read some of these threads and attempt to solve the programs yourself.

Member Avatar for ithelp
0
147
Member Avatar for myboo11009

>>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.

Member Avatar for ithelp
0
1K
Member Avatar for boydale1
Member Avatar for Dragonsfire

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]

Member Avatar for Dragonsfire
0
123
Member Avatar for lancevo3

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]

Member Avatar for SeeTheLite
0
271
Member Avatar for denyildani

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.

Member Avatar for MyRedz
0
1K
Member Avatar for cpsc1892

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]

Member Avatar for cpsc1892
0
2K
Member Avatar for power_computer

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.

Member Avatar for Ancient Dragon
0
179

The End.