48,986 Topics

Member Avatar for
Member Avatar for geekychick

I'm attempting to write a function that scans a number from the user as a string and converts the string to an array of int type, then reverses the order of the array and puts zeroes where no scanned data exists (eg. program says "Enter a number up to 5 …

Member Avatar for hollystyles
0
116
Member Avatar for HoldenCfld

I have to take in a list of song names. When the user types in "mmm" then it stops, and it spits out the first and last song titles in a sorted list (alphabetically). This is what I came up with, and there's many an error, all seemingly bool errors. …

Member Avatar for HoldenCfld
0
96
Member Avatar for amt_muk

Hi friends, Can you pls tell me about "[B]explicit template instantiation[/B]". Suppose I have a simple program : 1. File : TClass.h [code] #ifndef CTCLASS_H #define CTCLASS_H template<class T> class CTClass { public: CTClass(T t1, T t2); ~CTClass(); T add(); private: T cm_T1; T cm_T2; }; template<class T> CTClass<T>::CTClass(T t1,T …

Member Avatar for amt_muk
0
175
Member Avatar for penty

I am mingle with my CS labs to find the solution of how to find the maximum and minimum number of a entered numbers,can anyoe help me note "no function and array required to manipulate data in our lab";

Member Avatar for vmanes
0
81
Member Avatar for Ashu@sym

Hi, I am a newbie, can someone please clarify the difference between "\0" and '\0' and 0 as far as C++ is concerned?? Why can't they be used inter-changeably ??

Member Avatar for Ashu@sym
-1
7K
Member Avatar for Sembhi

Could someone please give me an idea on how to do this? Suppose you have a group of people that needs to be transported on buses and vans. You can charter a bus only if you can fill it. Each bus holds 50 people. You must provide cans for the …

Member Avatar for Sembhi
0
168
Member Avatar for splash47

a) A large city has a number of colleges which offer a number of courses. A course may be offered by a number of colleges but the course fee varies between them. In order to help a user to make a decision, a program is needed to provide the following …

Member Avatar for Ancient Dragon
0
71
Member Avatar for toko

Okay i am trying to make a lock this is my code: [CODE]#include <iostream> using namespace std; int main () { char key [10]="abcd"; char answer[10]; cout<< "password:"; cin >> answer; if( key == answer) cout << "correct"; else cout << "incorrect"; return main(); }[/CODE] when ever i try to …

Member Avatar for toko
0
123
Member Avatar for Robin_Dragon

I wish to a write a program that creates an array of 100 random integers in the range for just argument sake from 1 to 200 and, then use a sequential search to search the array 100 times using randomly generated targets in the same range. Can anybody please help …

Member Avatar for Narue
0
2K
Member Avatar for nquaoser

Help! I need to copy a char array initialized as a string from one array to another, using a function containing one line of code. Here is the code: [code]#include <iostream> using namespace std; void cpystr(char *instr, char *outstr); void cpystr(char *instr, char *outstr) { [COLOR=red]//Insert line of code here[/COLOR] …

Member Avatar for n.aggel
0
336
Member Avatar for anga08628

Write a C++ program that will read user's full name into a C-string. User will enter first name followed by one or more spaces and then the last name. Also, obtain user's student ID also into a C-string. Pass the name and ID obtained along with another C-string to a …

Member Avatar for Ancient Dragon
0
162
Member Avatar for eddy518

I'm new to C++.. and killing my brain to find this 1 error and cannot figure it out!! I don't understand why square cannot equal true??? or false?? this is my 3rd program for my class to turn in!! Any help would be appreciated!! Eddy //This program allow the user …

Member Avatar for twomers
0
217
Member Avatar for rghai6

Hi, i've been trying to create a program for implementing high/low pass filters on images. I get the data from a 24 bit .bmp file using the old file handling techniques. The file handling portion of my program works like a breeze, it is the arrays that are giving me …

Member Avatar for rghai6
0
120
Member Avatar for kamlesh_ag07

i am new with c++ and as i was going through all the post i found a reserved word i.e. namespace. i am unable to know what do u mean by this and as i was trying to run the program there was a error telling "namespace name required". i …

Member Avatar for ChaseVoid
0
95
Member Avatar for berty_xx

Hi, I write program whitch read data from more industrial PC by SNMP. In program I use functions SnmpMgrOpen(agent, community, timeout, retries); SnmpMgrRequest(*session, requestType, &variableBindings,&errorStatus, &errorIndex) and SnmpMgrClose(*session). Problem is in read data. From first 3 pc data is readed correctly, but from next pc no. Function return no error, …

0
53
Member Avatar for cowboys111

Hi i am writing a program to calculate the area of a shape using functions. I got the program to work fine when there was only one function and one shape however when i added the second one the program will still run both functions. That is even when i …

Member Avatar for ChaseVoid
0
97
Member Avatar for n.aggel

hi, i am reading the book "The c++ standard library -- a tutorial and reference"{N.M.Josuttis} in the beggining of the 6th chapter it says{in regard to container initialization}:: [CODE=c++] std::deque<int> c( (std::istream_iterator<int>(std::cin)), (std::istream_iterator<int>()) );[/CODE]{the weird indentation is on purpose} instead of:: [CODE=c++]std::deque<int> c(std::istream_iterator<int>(std::cin), std::istream_iterator<int>());[/CODE] because [QUOTE="N.M.Josuttis"]In this case, c declares …

Member Avatar for n.aggel
0
112
Member Avatar for conan19870619

>>>is there any limit/constraint on the maximum number of nodes that a linked list can have? >>>a linked list does not have to be implmented with a pointer. what else can be implementeation of linked lists? >>>how can a singly linked list be implemented so that insertion requires no test …

Member Avatar for conan19870619
0
130
Member Avatar for gaming_geek

Just for notes, I'm using VisualStudio 2003. I'm working on a program that's supposed to make the Muller-Lyer illusion. I've got all of the coding done, but now when I try to run it all I get is a load of errors. First, it starts to compile the program and …

Member Avatar for Sturm
0
113
Member Avatar for m_meena

Hi, during the build of my code, i m getting the following error error LNK2001: unresolved external symbol __imp__QueryServiceStatusEx@20 i have included the library file advapi32.lib in project --> settings. but still the error is same. any pointers?? TIA

Member Avatar for toko
0
63
Member Avatar for louise07

anybody here who could teach me how..or the function on printing an output file in linked list..

Member Avatar for louise07
0
87
Member Avatar for fundean

Hello, I know that "break" is used to end a loop, but how does one exit a C++ console program, after the user enters a negative value, without using a loop? For example, I would like to do this: if (value == -1) { system("exit");} But the code above does …

Member Avatar for Salem
0
106
Member Avatar for koolboy

[code] int main() { cout << "This Program was written by Nehal Shah\n" << endl; int num, total; cout << "Please enter an integer number:\t\t\t"; cin >> num; while ( num < 0 ) { cout << "\t********************************\n"; cout << "\t********** ERROR *************\n"; cout << "\t********************************\n"; cout << " --------------------------------------\n"; …

Member Avatar for ChaseVoid
0
189
Member Avatar for mylesnezri

How do do you close an external application after previously running it using shell execute in Borland C++ builderr?

Member Avatar for Ancient Dragon
0
20
Member Avatar for someguy88

What im wondering, is because im making a little text adventure game, and i have to write lots of descriptive writing and i would like it all to stay together in a paragraph. But the only way of getting that on output that i know of is to just have …

Member Avatar for someguy88
0
95
Member Avatar for Llama

ok, so I have read some tutorials on file streams, but i am still confused. I have made a program that edits a .txt (inputted by user) file, but my goal is to search an entire file for a string, and every time the string its found, I want it …

Member Avatar for Llama
0
112
Member Avatar for Duki

Hey everyone, I have an assignment to work on and it's a bit confusing. Here's the problem: [quote]Using dynamic arrays, implement a polynomial calss with polynomial additions, subtraction, and multiplication. Discussion: A variable in a polynomial does nothing but act as a placeholder for the coefficients. Hence, the only interesting …

Member Avatar for iamthwee
0
158
Member Avatar for eeneilson
Member Avatar for BadBoy5537

#include <iostream> #include <cmath> using namespace std; int main() { // Declare constants and variables const double ACCURACY = 0.00001; double x, factorial, ex_approx, ex_funct, curr_term; int terms, i; // Read value of x for exp(x) calculation cout << "Enter the value of x you wish to use for exp(x) …

Member Avatar for iamthwee
0
91
Member Avatar for laoballer

hello all, I'm new to c++ and am currently reading the book "C++ how to program" by Deitel. I'm working on exercise 7.15 from his book and am just stuck with the problem. Use a one-dimensional array to solve the following problem. Read in 20 numbers, each of which is …

Member Avatar for Narue
0
115

The End.