48,985 Topics
|
|
Does anyone know how to compare a old style character string with a character in qoutes? Example: I want to compare the first character in a record that is stored in an old style character string with a `*`. Here's what I have in my code: char FirstCharacter[1]; // Character … |
|
I'm stuck, I have a base class String, derived class Pstring, and trying to develop another derived class Pstring2. Pstring2 needs a function called left. Main will call the function by Text.left(Text1,N) // Text2 is assigned the leftmost N characters from Text1. I'm having a hard time understanding how to … |
|
i have to define a function that tests number from 2 to 10000 to see if they are prime. heres what i have so far. [code] #include <iostream> #include <iomanip> using namespace std; bool find_prime(int); int main () { int i, counter =0; bool test; for (i =2; i <= … |
|
hi i have just got my self a Borland 4.5 from ebay and would like some help in using it. i am very new to programing and i would like to be able to put a shoping cart on my website but i know nothing about it all help very … |
|
I wanna create an array whose size would be determined by a variable, but i when i write the following, i got an error int main () { int a; std::cin >> a; int intArray [a]; return 0; } the error is "an constant expected". |
|
in a book there is a code that i am trying out and my compiler keeps giving me diferent errors (compiler is Borland C++) and i dont know how to fix them. the code is [code] //----------------------------------------------------------------- // Skeleton Application // C++ Source - Skeleton.cpp //----------------------------------------------------------------- //----------------------------------------------------------------- // Include Files … |
|
Yes - I'm a noob. :rolleyes: I just wanted to be 100% sure that I understand what a parameter is before I go on lol. [Code] #include <iostream> //header of function? int Add (int x, int y) { using std::cout; //Parameters x and y? cout << "In Add(), received " … |
|
In this book I'm using, Sams Teach your self C++, it says to: Start compiler, choose file, choose Win32 Console Application, choose empty project, choose C++ source file, edit source code, choose build, check that you have know build errors and run the program. Whats the difference betweeen Build and … |
|
Iam reading in a 4row 3column table. Iam refering to char_function[4][3] in the following code.This is a part of a larger program. You can neglect all other things and look at char_function my aim is to print it out [code]#include<iostream> using namespace std; int N, Q, M;//number of user inputs, … |
|
There used to be a a clrscr () function in conio.h include file which clears the screen, but this function is not in the conio.h file in visual C++ 6. How can i clear the screen without clrscr()? |
|
I am new to programming in any language and right now i am using C++. im having trouble getting started with programming because i dont know how to use code together very well to create my own programs if anyone would refer some book or website or just give some … |
|
ok so im taking a class at school and we have a lab that i am stuck on. "the program must read in an inventory list of items at a small retail store." i have most of it but im stuck on getting a discount price and having it line … |
|
How can I use the Checkboxes of a Tree Control in Visual C++ 6, I add it in properties but I don't know how to program de detection of the click over the checkbox. The idea is that the user can make multiple selections, in order to store every item … |
|
i am suppossed to write a program using an array of strings to hold the words of the ICAO alphabet, and index the array by the positions of the letters of the alphabet. I started it off but cannot figure it out please help!! #include <iostream> const int n_row=26; const … |
|
Hey, I am in a beginning C++/C# Class and we are jsut starting the Math LIbrary. I need to write a program that displays all perfect integers up to 100. I am required to write a boolean function, IsPerfect(), to use in the program. My problem is I was either … |
|
Hi I am in the process of developing a series of tutorial cds for programming and web designing like C C++ Java html etc My first Cd is on C programming languages I need feedback 1) Completely flash based or completely html based...... if a combo of both which more … |
|
I am trying to create a random access file from a sequential file. I have the random access file skeletonized with "dummy records". An example of my dummy record is: 100 *********ZZZZZZZZZZXXXXXXXXXXYYYYYYYYYYYYYYYYYYYY00.00 -1 *********ZZZZZZZZZZXXXXXXXXXXYYYYYYYYYYYYYYYYYYYY00.00 -1 The "*'s" are a SSN, "Z's" are the last name, etc, etc. The 100 and … |
|
[FONT=Arial]undefined[/FONT] hi.!! guyzzz.... i am an eng'g student.. nyways... im using turbo c++ 4.5, i cnt run programs that is in graphics mode :confused: ... it tells that it didnt support a BGI..(graphics.h)... can you suggest me on how to solve my problem??? PLEASE???? :sad: hope you could help me … |
|
I am using VC++6.0 I am attempting to implement the TEA for a Oracle server. I am plannng to write the algorithm in C++(C), then add it to a shared library. I am new with C++ and I am having some difficlulty, mainly in two basic areas: 1. I want … |
|
Hi ppl I would really appreciate if someone help me out here. I really tried to do this problem and its driving me crazy. All I could get is the algorithum of worst fit, best-fit next fit and first fit. Please help me as soon as I can. And I … |
|
I posted earlier for help with this and someone gave me a good clue and I worked with it but I am still boggled. I have been working on a couple different ways to accomplish this but have come up with nothing right yet. I am close but still need … |
|
Can anyone tell me how to compare a string to an integer? I have a SSN stored as a string, SSN[10]. I need to compare each number in the SSN. What I need to do is to add up the ASCII values of the SSN to use for a hashing … |
|
I'm not understanding the error I'm getting. #include <iostream> using namespace std; const double rServiceCost = 10.00; const double rPerMinuteCharge = .20; const double pServiceCost = 25.00; const double pDayPerMinuteCharge = .10; const double pNightPerMinuteCharge = .05; int main() { int minutes; int dayMinutes; int nightMinutes; double dayMinuteCharge; double nightMinuteCharge; … |
|
How can intract ODBE with C++, Waiting for your kind responce.. |
|
[php] #include <iostream> #include <cmath> using namespace std; class point { public: point(int xcoord , int ycoord); //constructor point(); int getX(); int getY(); double getDistance( point otherPoint ); void setpnt(point p); private: int x, y; }; class rectangle { public: rectangle(point p1, point p2, point p3, point p4); void perimeter(); … |
|
hi administrator, I'm a beginner in c++.I need to draw a graph(x vs y type).I used graphics.h and ended up with a very primitive version of a graph.The graph appears like a scribbling in the top left corner of the screen.I don't know how to draw the x and y … |
|
Hello i'm very new to programming and self teaching myself. I'm having a problem with my project. I'm trying to preform an equation, but every time I in put the variable it runs to the end. It is a programm to help solve precents for my friend. This is the … |
|
consider this for [code]int i.j; for (i=0;i<=5;i++){ for (j=i+1;j<=5;j++){cout<<"\n"<<i<<"\t"<<j<<"\n"; } }[/code] now suppose we have[code]list<string>::iterator l,m;[/code] the corresponding thing[code] for (l=0;l<=5;l++){ for (k=l+1;k<=5;k++){cout<<"\n"<<i<<"\t"<<j<<"\n"; } }[/code] won't work because "l+1" is meaningless here. How do I solve this problem? |
|
As a part of a larger problem I have to solve the following:: *input - number of variables (say n=4) *input - 'n' numbers in decimal (say 1,3,5,7) *I need to check for all the grey code neighbours i.e, to say, 2=00000001(a fixed length string) and 3=00000011(a fixed length string) … |
|
Here's what I have so far and here's my response from my teacher. I'm not exactly sure what or where the problem is. Anyone else see it? Have you run this project with many different test cases, and does it work? At first glance, it seems to me that the … |
The End.