49,757 Topics

Member Avatar for
Member Avatar for aejr

Please help me, The question is: "Write a program to accomadate 10 integers. Print the variables at position 3,5 and 2 respectively." thank you!

Member Avatar for ShawnCplus
0
88
Member Avatar for lipun4u

Look at the following code... [CODE=cpp]#include <iostream> #include <cstring> using namespace std; class string { char *p; int len; public: string(char *); void show() { cout<<p<<endl; } }; string :: string(char *p) { len = strlen(p); this.p = new char[len+1]; strcpy(this.p, p); } int main() { string s1, s2; char …

Member Avatar for lipun4u
0
95
Member Avatar for sam d

please help me wright this program[code]use for loop to construct a program that displays a pyramid of x it should be 20 lines high[/code]

Member Avatar for Grn Xtrm
-2
35
Member Avatar for Phil++

Hey, I'm confused... Are Static references the same as Static variables? Thanks

Member Avatar for Phil++
0
70
Member Avatar for NervousWreck

I am writing a fake banking program. In the function below I declare a dynamic array. [CODE]void trArr(int transactions) { int n; string* accUse = new string[transactions]; return; }[/CODE] I try to access the array in a later function but I get the error "not declared at this scope. I …

Member Avatar for Nick Evan
0
92
Member Avatar for atch

Hi everyone, I'm trying to compare list iterators: [code=c++] list<int> l; list<int>::iterator lb = l.begin(); list<int>::iterator le = l.end(); if (lb < le) //here I'm getting error - no operator match these operands: { //do something } [/code] And when I change this that instead of list I have vector …

Member Avatar for atch
0
110
Member Avatar for Triztian

Hi I think this is my first post, so here it goes: [B]Overview:[/B] [INDENT] This program declares global bidimensional array of 30 rows and 5 columns (not counting 0 in the rows) of floating type to save information of students, table is as follows: ID Partial1 Partial2 Partial3 Partial4 Average …

Member Avatar for vmanes
0
114
Member Avatar for jt241

Well I'm relatively new to the forums and to C++. I'd like to overload + and = to add two matrices by being able to use Z=X+Y format. Header file: [CODE] #ifndef HOMEWORK1_H #define HOMEWORK1_H class Matrix{ public: double **element; Matrix(int=3,int=3); ~Matrix(); double getelement(int,int); void setelement(int, int,double); Matrix & operator+(const …

Member Avatar for dkalita
0
189
Member Avatar for royalbow

I'm new to visual studio 2008. I'm trying to make another form be called by the first form by a button. Where and how do I create an instance of the 2nd form? I'm working with a CLR (Windows Forms Application). Please and thank you.

0
47
Member Avatar for unsure

I am taking an intro to cs class. I have written a simple program but dont know if it is correct. please help me. thank you!

Member Avatar for pspwxp fan
0
123
Member Avatar for merse

Hi! We can declare not just variables but functions or pointer to functions also in the main function like this: double my_f(double); double (*my_fp)(double); But what can we do with this? For example how can we give a value for my_f or my_fp? I try lots of variants with * …

Member Avatar for Grn Xtrm
0
149
Member Avatar for drjay1627

can someone please explain to me how read write work in sock programming. my assignment is to run a server and client. the client ask the server "who are you?" and the server replies with the servers name and date and time. i cannot post my whole code here as …

Member Avatar for dkalita
0
238
Member Avatar for Web_Sailor

Hi I have written a program in c++ and I feel that it is a bit slow for very large datasets like > 1GB. Well I am not that confident in char* since I have just started coding in c++. So can anybody help me to make it more efficient …

Member Avatar for dkalita
0
142
Member Avatar for Lukezzz

I have a project that consist of 10 forms. When I compile this project I get this compile error. [I]1>Form6.obj : error LNK2011: precompiled object not linked in; image may not run 1>LINK : fatal error LNK1104: cannot open file '.\Debug\Form6.obj'[/I] In the debugfolder I can find these anyway but …

Member Avatar for Lukezzz
0
285
Member Avatar for dabeechman

I am new to programming, but I am trying to create two arrays, arrX and arrY. Then use scanf to insert intialnum amount of elements into each array. That is the easy part. Where I am having trouble is when I try to pull the first element in each array …

Member Avatar for dabeechman
0
87
Member Avatar for moneeka

Design Problem 1 1. Develop sigma and pie bonding and anti bonding molecular orbitals of 2s and 2p Using C or C++ programming language. Expected Outcome: I. Shape of molecular orbitals must be known in depth. II. Proper assignment of bonding and anti bonding molecular orbitals should be stated. III. …

0
60
Member Avatar for jqorso

Hi, I have some experience with C++ and FORTRAN. I would like to write software to help me visualize shapes in a GUI-based program. Where is a good place to start? Books, websites, etc that would help me get an idea of what is needed would be good. Thanks!

Member Avatar for K0ns3rv
0
106
Member Avatar for PennKen2009

I'm new at C++ and I'm trying to right a program that will generate random numbers from a range of 1-19. Here's how it should work, the program will generate 5 random numbers all ranged 1-19 and in random order. Once it chooses the first number, that number used for …

Member Avatar for zati
0
740
Member Avatar for ddashtrois

i'm a complete beginner to C++. its my fourth week learning it. we have this for a homework assignment: "This program outputs all prime numbers between 3 and 100 using a doubly-nested loop." first off, i've done a lot of research online and from what i've seen the most efficient …

Member Avatar for mrnutty
0
410
Member Avatar for LaurenR

I need to write a function splitMid that will split a linked list into two sublists of equal size. I have written most of the functions that I need to achieve this and some other things, but I am having trouble getting started on this function. Can anyone point me …

Member Avatar for VernonDozier
0
508
Member Avatar for swolll

I need to compute the number of nonnegative numbers from an input file. Everything works fine (for good input files and bad input files) except when there is a no data file (with nothing in it). Then, the number of nonneg numbers reads 1, even though it should be 0. …

Member Avatar for Zjarek
0
175
Member Avatar for jdrei

i'm in a beginning c++ class and we have to write a program that finds all primes between 2 and 100 within a doubly nested loop. i feel like i'm really close but i think i've been doing it too long and can't figure out what i'm doing wrong...... help …

Member Avatar for VernonDozier
0
2K
Member Avatar for hopeful man

Hi everybody, i am a new in c++ programming ,, and i am trying to answer this question to get the required result, but i could't till now .. i need your help in order to be able to answer this question correctly. the question is : write a program …

Member Avatar for mrnutty
0
106
Member Avatar for saurabh gulati

how i could make calculator inc++ that do calculation in regular interval like it do calculation as same as the calculator

Member Avatar for Grn Xtrm
0
66
Member Avatar for PDB1982

I am a beginner level C++ student, so please forgive me if I use the wrong terminology here....I need to create a program that takes a set of integers from a source file, tells whether the numbers are odd or even integers, and then adds the odds and the evens …

Member Avatar for PDB1982
0
100
Member Avatar for Phil++

What are instance variables please? Also, is this a good explanation for Encapsulation: Encapsulation or information hiding is all about hiding the details of the implementation of the interface. Encapsulation is used to prevent users from viewing the inner workings of the interface. A real life example of Encapsulation is …

Member Avatar for Tom Gunn
0
100
Member Avatar for surfer2009

i am new in programming . i have a clock code. but want to modify it. when user press "0" it increment in time by 5min and when press "1" increment time by 10 min _______________ [CODE]//The complete program listing of the program that defines //and uses the class clockType …

Member Avatar for Kashaku
0
1K
Member Avatar for Phil++

Hey, I'm just wondering if it's possible to run an if statement through a class? The thing is, I wanna store users details and then when you search for a user, i.e "Phill" it returns all the information on that user. I'm using something like: [CODE] c1.GetName(); [/CODE] So something …

Member Avatar for Nick Evan
0
90
Member Avatar for neithan

[ICODE] * Don't use system("pause") to pause your program if possible. Use getchar( ) if you are using C and cin.get( ) if you are using C++. [/ICODE] Why is that? A reasonable explanations for those tips would help to learn.

Member Avatar for marco93
0
672
Member Avatar for ChaosBG

Hey guys i've tryed to find how to do this the best way but it failed. So i want to ask the experts here: How to add a new line of text to a edit control. Example: I have alredy some text in the edibox and i want to add …

Member Avatar for marco93
0
391

The End.