49,761 Topics

Member Avatar for
Member Avatar for Snapster5

Hi i put most of the //discriptions in so it should be easy to tell what is suppose tohappen where. It is longer then it seems, its very beginner level. Also im not sure i did the functions and arrays perfect. Errors i have before i have been able to …

Member Avatar for Snapster5
0
144
Member Avatar for UberJoker

Hey guys. I have the following string array, say, string array[2]; array[0] = "hello7925"; array[1] = "bye344539"; I want to read the last two characters from each string in the array, which in this case are 25 and 39 and then put them in a separate array like this.. int …

Member Avatar for UberJoker
0
206
Member Avatar for ukbassman88

I am working on a study guide for my final exam and need help with this question. Thanks in advance for the help. Write a value-returning function called "prod" that has parameters of two int arrays "arr1" and "arr2" of size"length". "Length" is also a parameter. This function should return …

Member Avatar for ukbassman88
-2
98
Member Avatar for fada4ever

include a derive class named sphere from the base circle class. the only additional class members of sphere should be s constructor and a calcval () function that returns the volume of the sphere... please kindly help me in correcting the code.. #include <iostream> #include <cmath> using namespace std; const …

Member Avatar for mrnutty
0
169
Member Avatar for amel036yippee

hello.. i need tips to solve the problem. The situation is like this: I have randomly generated 20 (pop) array of length = board. The output is this: [QUOTE] [B]1 3 6 4 1 4 6 6[/B] 2 0 1 1 1 3 1 3 3 6 3 4 7 …

Member Avatar for amel036yippee
0
129
Member Avatar for Neon87

Hi I have a question regarding runtime polymorphism. I have for example [CODE]derived A; base *B;[/CODE] and I do this [CODE]B=&A;[/CODE] if A goes out of scope does this mean the pointer B is a bad pointer meaning it does not point to anywhere? If so, does this mean I …

Member Avatar for Narue
0
97
Member Avatar for winecoding

How many constructor (including copy constructor) and destructors will be called for test1 and test2? [CODE]#include <iostream> using namespace std; class Base{ public: Base(){cout << "Base()" << endl;} Base(const Base&){cout << "Base(const Base&)" << endl;} ~Base(){cout << "~Base()" << endl;} }; Base func(Base b){return b;} void test(){ Base a; func(a); …

Member Avatar for Lawand
0
83
Member Avatar for Stefano Mtangoo

I'm curious what you Developer uses: 1. What is your favorite IDE 2. What is your favorite GUI library 3. What is library that you often use? 4. Anything related?

Member Avatar for Lawand
0
136
Member Avatar for BigTito89

Hi, I'm having a problem wrapping my head around a problem. Here is the problem: Develop a program that will input a binary string and then, using bitwise operations, do a two's complement on the string and display it. Use UNSIGNED data types for the bit strings. So far, I …

Member Avatar for r.stiltskin
1
975
Member Avatar for vinochick

I need to write a program that uses P = (nRT)/V P = pressure V = volume n = number of moles R= universal gas constant (8.31 j/mol K) T = absolute temperatre All variables must be local, no global variables. Inputs to the program include kelving temp, initial and …

0
58
Member Avatar for edgar5

I am a developer on the open source Audacity team and am trying to add some functionality. Currently if you drag the icon of a supported type (fi song.wav) onto an open Audacity project it loads the file. However if you drag song.lnk (like an XP shortcut but different--looks like …

Member Avatar for mitrmkar
0
217
Member Avatar for jp071

Hello, Referenced memory error in visual c++ .exe file. When i was run my program's .exe file (program written by visual c++ 2008 win32 windows application), it could work fine. but problem is when i click a button for executing something and display on the window screen (otherwise it works …

Member Avatar for donaldw
0
120
Member Avatar for V5dave

Am new to C++ and don't know if I'm doing something fundementally wrong. Have a form with a textbox and buttons. When I click on button, I am running a function in my .cpp file. However, in this function I need to update the text box in the form. Have …

Member Avatar for gpushee
0
586
Member Avatar for walter clark

What I want to do must be easy because I can't find it on the web. I have existing C code with char* strings all over the place. I'd like to get those strings to the Form1.h file so I can use them there. All I want is... String^ newText; …

Member Avatar for walter clark
0
97
Member Avatar for pilu

Hello, I'm quite new to c#. I have one C++ dll in which I have the two simple add & delete functions. [code]int MyTestFuncs::Add(int a, int b) { return a + b; }[/code] I have to access them into the C# code. I have faced the following error - When …

Member Avatar for DdoubleD
0
285
Member Avatar for earlati2

I used this simple code to test an memory leak reported by valgrind. [CODE=cpp] /****************************************** * FILE: t3.c * Compiled using : g++ -g t3.c -o t3 * * $ g++ -v * Reading specs from /usr/lib/gcc/i686-pc-linux-gnu/3.4.6/specs * Configured with: ./configure --prefix=/usr --infodir=/share/info --mandir=/share/man * --enable-languages=c,c++ --with-system-zlib --program-suffix=-3.4 --enable-threads=posix * …

0
66
Member Avatar for ueoptimum

Sorry for disturb you all, but a I'm newbie..because my teacher give a assignment.. this my assignment.. [B] Machine Problem[/B] 1. Make a C program that will display "I will pass PRGLF" on the center of the screen. 2. Design a program in C language that will display "#" at …

Member Avatar for zalezog
-1
126
Member Avatar for DJZ

My teacher gave use a project were we have to read a text from a file and then output some results. I have got C++ to read the text from file but I have to average out each persons test scores and then output them. I am not sure how …

Member Avatar for Ancient Dragon
0
93
Member Avatar for foxmulder

Hi! For my last assignment I was told do create a program which can read-, sort- sand save a textfile (.txt). For example, I have a textfile containing 5 movies, this file is going to be read by the program and then sorted (in alphabetical order) and then saved to …

Member Avatar for Ancient Dragon
0
194
Member Avatar for forstudy3

I have written a function which will open the file with the input name provided.I am compiling on a Linux box using g++ compiler.Detail code below Plz let me know what is the wrong in code. [CODE]1 #include<iostream> 2 #include<fstream> 3 #include<string> 4 #include<stddef.h> 5 #include<cstddef> 6 #include<cstring> 7 8 …

Member Avatar for Clinton Portis
0
290
Member Avatar for sidra 100
Member Avatar for sidra 100
-5
71
Member Avatar for BSKI01

I know there are many things like this on this site already but my teacher is smart and will search to find out if we just copied from an internet interveiw Hello My name is Ben and I am a sophomore at high school in New York. I am currently …

Member Avatar for ithelp
0
97
Member Avatar for miag

[COLOR="Green"]i'm so confused with this program. should anyone give me some clues how to begin?[/COLOR] Define a class called StringSet that will be used to store a set of STL strings. Use an array to store strings. Create a constructor that takes as an input parameter an array of strings …

Member Avatar for jonsca
0
112
Member Avatar for FancyShoes

I want it so that when a user doesn't enter char r,p,g,m,c,y it will come up and say incorrect input enter 4 correct values. This is what I have. [CODE]while( (g.one || g.two || g.three || g.four) != ('r' || 'p' || 'g' || 'm' || 'c' || 'y') );[/CODE] …

Member Avatar for FancyShoes
0
130
Member Avatar for nychick

Hey everyone, I'm trying to implement a operator overload of several operators. I want to make sure my syntax is correct. Here's my old Class implementation: [CODE]#include <iostream> using namespace std; class Date { private: int mn; //month component of a date int dy; //day component of a date int …

Member Avatar for jonsca
0
88
Member Avatar for mymyzzz

I need to finish this program, but i have no idea how to! please help me figure this out. [code] #include <iostream> #include <fstream> using namespace std; void printShips(char [15][15]); void fire(int row, int col, char ocean[15][15], char &result, char &ship); struct counter { int B, C, D, F, T, …

Member Avatar for Clinton Portis
0
401
Member Avatar for eduard77

Can anyone tell me what is wrong with this code? I found it on Wikipedia When I compile it it gives me a lot of errors [code] void parallel(int num_threads,int matrix_demention) int i; for(i=0;i<num_threads;i++) create_thread(&threads[i],i); pthread_attr_destroy(&attr); // Free attribute and wait for the other threads for(i=0;i<p;i++) pthread_join(threads[i],NULL); void *gauss(int thread_id) …

Member Avatar for Clinton Portis
0
139
Member Avatar for amel036yippee

Hello! I'm a newbie here... Straight to the point, I tried to create a program as stated in the title above musing C++. Below are the code I used: [CODE]#include <iostream> #include <cstdlib> const board=8; const pop=20; using std::cout; using std::endl; double table[board][board]; int r; int c; int main() { …

Member Avatar for amel036yippee
0
98
Member Avatar for Stefano Mtangoo

I see alot of libraries written in C and I like C++ OOP way. How can I use a given C library functions in C++?

Member Avatar for Stefano Mtangoo
0
174
Member Avatar for uberian22

i am getting errors when i compile this program [CODE]#include <iostream> #include <cctype> using namespace std; const int MAX_DIGITS = 20; int size; // number of digits in the integer int digit[MAX_DIGITS]; // the digits stored in reverse order void inputBigInt (int a[], int& sizeA); / void outputBigInt(int a[], int …

Member Avatar for uberian22
0
76

The End.