49,760 Topics

Member Avatar for
Member Avatar for annagraphicart

[code] #include <iostream> #include <string> using namespace std; int main() { string names[4] = {"Anna" , "Jenny", "George" , "Michael"}; int score[4]; for(int i = 0; i < 3; i++) { cout << names[i] << ": "; cin >> score[i]; cin.ignore(); } //sort by score for ( int i = …

Member Avatar for Duki
0
213
Member Avatar for annagraphicart

Sorry about that. Please help here. Extremely important. It says I need to declare the "i" in scores[i] But im not sure what to do. [code=cplusplus] #include <iostream> #include <string> using namespace std; int main() { //Declaring variables string names[3] = {"John","Anne","Mary"}; int score[3]; int points[3]; //Ask for scores. cout …

Member Avatar for Ancient Dragon
0
169
Member Avatar for annagraphicart

Can ya'll take a look at this? [code=cplusplus] #include <iostream> #include <string> using namespace std; int main() { string names[3] = {"John","Anne","Mary"}; int score[i]; cout << "Enter Scores" << endl << endl; cout << "Anna Marie: "; cin >> score[i]; //sort by score for ( int i = 0; i …

Member Avatar for Ancient Dragon
0
78
Member Avatar for JohnHull

:sad: Write a C++ template class Nvector that enables arrays with negative subscripts to be defined. The class should be usable in the following code fragment: [code]Nvector<double> a; // instantiate double array class a.resize(-10, 10); // allocate array from locations -10 to 10 for(int i=-10 ; i<=10 ; ++i) a[i] …

Member Avatar for Salem
0
115
Member Avatar for metalbassist56

Hey, I'm new to programming and I was wondering if anyone could tell me how to create a simple Yes/No interface for a program so I can figure out how to do things like that...

Member Avatar for Duki
0
148
Member Avatar for kazek

Am currently working on a car dealer system. Am trying to design the system in a way that a user can view the number of vehicles available, the type, e.t.c and obviously the user can make a purchase. At the moment am just trying to deal with the basics. Am …

Member Avatar for Salem
0
3K
Member Avatar for Donnovan

Hi, I'm using Microsoft Visual C++ and I keep getting this error referring to this one line in my main file . can someone HELP ME ? [code]#include <iostream> using namespace std; int main() { float tempFahrenheit; float tempCelsius; float Omrekenen; cout << "Geef de temperatuur in Fahrenheit: "; cin …

Member Avatar for Donnovan
0
193
Member Avatar for punizzel

Hey guys, Big problem. So heres the deal. I am trying to make a program which reads a two dimentional array from a file then prints it out on the screen. The the user inputs a treshold number. What the out put is supposed to be is to find a …

Member Avatar for iamthwee
0
77
Member Avatar for JBI_UK

Hi there, I downloaded all the things i need for the building of the Firefox source code but the thing is, I want to be able to actually edit it before i build it... You know so it doesn't say Firefox just like what Flock did. If anyone knows how …

Member Avatar for Salem
0
84
Member Avatar for wendy2learn

Have you ever used Quincy 2005 for writing and compiling your c++ codes? Quincy 2005 is simply an open source IDE for c/c++. It's simple. However, this application frequently gives me a headache. What I can describe from this IDE is it is unstable, clearly unstable. Recently, I worked on …

Member Avatar for Salem
0
755
Member Avatar for z_imi

Hi. I want to connecting modem and dial a number when my program start to running, but I do not know how access to ?!! Can anyone help me?

Member Avatar for Salem
0
30
Member Avatar for ampdoc

I need some info on how to write a C++ program,that starts with a while staments.I need the cus balance not to exceed the credit limit.

Member Avatar for iamthwee
0
79
Member Avatar for madhan

[COLOR=#000000]I am executing all my c/c++ programs in VC++ cmpiler.[/COLOR] [COLOR=#000000] [/COLOR] [COLOR=blue]#include[/COLOR][COLOR=#000000] [/COLOR][COLOR=maroon]<iostream>[/COLOR] [COLOR=maroon] [/COLOR] [COLOR=blue]using[/COLOR][COLOR=#000000] [/COLOR][COLOR=blue]namespace[/COLOR][COLOR=#000000] std;[/COLOR] [COLOR=#000000] [/COLOR] [COLOR=blue]int[/COLOR][COLOR=#000000] main() [/COLOR] [COLOR=#000000]{[/COLOR] [COLOR=blue]int[/COLOR][COLOR=#000000] age; [/COLOR] [COLOR=blue]char[/COLOR][COLOR=#000000] sex;[/COLOR] [COLOR=#000000] [/COLOR] [COLOR=#000000] [/COLOR] [COLOR=#000000]cout<<[/COLOR][COLOR=maroon]"please input your age:"[/COLOR][COLOR=#000000]; [/COLOR] [COLOR=#000000] [/COLOR] [COLOR=#000000]cout<<[/COLOR][COLOR=maroon]"please input your sex (M/F):"[/COLOR][COLOR=#000000];[/COLOR] [COLOR=#000000]cin>> age; [/COLOR] [COLOR=#000000]cin>> …

Member Avatar for Tom_Zeke
0
5K
Member Avatar for xerenist

i don't know if it allowed to ask like this,, but this triangle make me confused(coz i'm new in C++) but,can u teach me how to make it?/explain how am i supposed 2 do? the triangle is like this: [code] 1 2 3 4 2 3 4 5 6 5 …

Member Avatar for Ancient Dragon
0
114
Member Avatar for wendy2learn

I'm having problem with my program here. See, I have an array of char* as data member in Action class. With the help of getFirst() function, I'm returning the value of the first element in the array. But, when I tried to print out this value in the test.cpp, it …

Member Avatar for Salem
0
114
Member Avatar for Jaav

Hello. I have knowledge in both VB.NET and C++. What I can do in C++ is mostly console apps that are made from scratch. What I know in VB.NET is using the Visual 2005 express edition to make a simple game. I'm planning on starting making a big but still …

Member Avatar for Narue
0
161
Member Avatar for n.aggel

I want to output code{formated with color} to a .doc{or .odt} file or an html file for a report.... How can i do this? PS::tell me if i don't phrase the question well, so i can rephrase it!

Member Avatar for GreenDay2001
0
94
Member Avatar for suziperu

hello friends i need help about the "Extension" part pls help me.. a menu driven c++ program using case/switch that gives the user the following options: A. Fahrenheit to Celsius Converter B. Celsius to Fahrenheit Converter C. Inches to Feet converter D. Feet to Inches Converter The program should work …

Member Avatar for GreenDay2001
0
203
Member Avatar for pop007

Hello all, I have done with this code Output : Enter n = 5 2+4+6+8+10 = 30 I compile with Turbo C++, version 3 here is my code [code] #include <iostream.h> #include <conio.h> void main() { clrscr(); int n, sum=0; cout<<"Enter n= "; cin>>n; for (int i=1; i<=n; i++) { …

Member Avatar for WaltP
0
97
Member Avatar for brijendramishra

[code] #include<iostream.h> #include<conio.h> typedef class { int i; float b; public: obj() { cout<<"\n Is this constructor \n"; } void show() { cout<<"fkjhfg"; } }obj; void main() { clrscr(); obj o; o.show(); getch(); } [/code] In this code ,of Anonymous class object is calling the show function ,but its constructor …

Member Avatar for VatooVatoo
0
89
Member Avatar for annagraphicart

Okay, I need my output to be numbered. I know the index code works but idk how to use that. However, i also need to know how to do the if/else statement, so that if the output is "0", then they dont get an index, they just recieve "0"

Member Avatar for Narue
0
301
Member Avatar for Duki

Could someone possibly post a brief explanation of the differences between member and nonmember operator overloading?

Member Avatar for iamthwee
0
90
Member Avatar for Renjith VR

Can we fix the terminal(console) size according to data displayed? I am working in c++,and my O.S is kubuntu.Using c++ i can align the data displayed in cosole, but before i want to change the terminal to a particular size.otherwise it is not aligned the data. Any way to change …

Member Avatar for Narue
0
145
Member Avatar for Ashu@sym

I want to assign a TCHAR char array to std::string in VC++ 2005, how should i do that? a simple assignment gives error i.e TCHAR buffer[MAX-1]; std::string data; //some operation for filling the buffer data = buffer; //This gives error Plz help me in doing this operation.

Member Avatar for Ashu@sym
0
2K
Member Avatar for curt22

Could someone explain how to use a list view in the windows api (Like when your in windows explorer in details view). I read an article about it and searched google, but I'm still not sure how to use it could someone explain it to me. I want a simple …

Member Avatar for Ancient Dragon
-1
74
Member Avatar for Duki

Hey everyone. I need to write program that builds an object of Pizza class and then pass that object to Order class. here's my Pizza class: [code]class Pizza { public: void setCheeseToppings ( int ) ; void setPepperoniToppings ( int ) ; void setSize ( string ) ; void setType …

Member Avatar for Duki
0
186
Member Avatar for JC7

I've been learning the .NET framework in vC++ for a while and I'm thinking of going to C#. I'd like to here the opinions of others who have experience with both. Thanks.

Member Avatar for nicentral
0
189
Member Avatar for cutepoison

[code] #include<iostream.h> int functlargest(int, int, int); int functsmallest(); int functdifference(); int main() { int num1, num2, num3; cout<<"please enter 3 numbers: "; cin>> num1 >> num2 >> num3; functlargest(int); functsmallest(int); functdifference(int); return 0; } functlargest(int a,int b, int c) { if (num1> num2 && num1>num3) cout<<"The largest number is: "<<num1<<endl; …

Member Avatar for Narue
0
104
Member Avatar for m_meena

Hi all, I want to create a script file which builds my projects in VC++, C#, VB and .NET. When i build a component by command line it gives error for the dependent libraries. How can i give the option or specify path for the libraries and include files to …

Member Avatar for Narue
0
123
Member Avatar for DeathEvil

part of the code [CODE] string phone_book[11] = {"Becky Warren, 678-1223", "Joe Looney, 586-0097", "Geri Palmer, 223-8787", "Lynn Presnell, 887-1212", "Holly Gaddis, 223-8878", "Sam Wiggins, 486-0998", "Bob Kain, 586-8712", "Tim Haynes, 586-7676", "Warren Gaddis, 223-9037", "Jean James, 678-4939", "Ron Palmer, 486-2783"}; int x, index; char lookup[50], *strPtr = NULL; /********************************** …

Member Avatar for DeathEvil
0
154

The End.