49,761 Topics

Member Avatar for
Member Avatar for lapunluyang
Member Avatar for NicAx64
0
201
Member Avatar for MVideoGms

I keep getting this error and I can't figure out what is wrong. error C2227: left of '->capacity' must point to class/struct/union/generic type 1> type is 'int *' Here is the class header and declaration that I am working on. [CODE]#ifndef MYVECTOR_H #define MYVECTOR_H #include <iostream> //#include <sstream> //#include <string> …

Member Avatar for Ancient Dragon
0
182
Member Avatar for cogitoergosum18

#include <iostream> using namespace std; int main() { int firstNo;// first number is stored here int secondNo, int resultAdd,// variable for result when first number and second number are added int resultSub,// variable for result when first number and second number are subtracted int resultMult,// variable for result when first …

Member Avatar for cogitoergosum18
0
229
Member Avatar for aikiart

Good afternoon, I'm working on a class assignmeent trying to use overloaded math operators + - but i'm getting the following error when I compile. Line 29 of the main program generates this error: Linker error undefined reference to 'TimeClass::operator+(TimeClass const&) any help is appreciated. Here is the code: TimeClass.h …

Member Avatar for aikiart
0
183
Member Avatar for XMasterrrr

hello guys i'm proud to join this community and be with you guys so i saw the sticky thread but i can't figure out what the best book i'm new to programming but i was reading a book called : starting out c++ early objects 5th edition and i already …

Member Avatar for XMasterrrr
0
168
Member Avatar for wesduncan

I'm actually not even sure if this is possible. But I'm making a program just to help make checking gains/losses with the stock market easier for me. It's not real money just trying it out to see how I would do. But with the program, I'm just going to ask …

Member Avatar for prvnkmr449
0
112
Member Avatar for cjreischl

Hi. I am creating a program for class that can be used to gather statisctical data about the number of movies college students watch in a certain time frame. I have to find the average, median and mode and show this in the output. I am able to get my …

Member Avatar for cjreischl
0
138
Member Avatar for PixelExchange

I've recently heard that using a .gif image in a commercial software... is strictly prohibited.. without first aquring a commercial license from Compuserve (the makers of the .gif image format). Does anyone know if it is actually true that a commercial license has to be bought in order to use …

0
61
Member Avatar for jrw89

I am working through Accelerated C++ and am on exercise 3-5. The question is:[QUOTE]Write a program that will keep track of grades for several students at once. The program could keep two vectors in sync: The first should hold the student's names, and the second the final grades that can …

Member Avatar for mrnutty
0
188
Member Avatar for camelCase

Hello DaniWebbers, How would I go about taking user input into a string? It is not allowing me to do: [CODE] #include <iostream> #include <string> using namespace std; int main() { string users_name; // Reserved for the users name (input) cout << "Enter your name: "; cin >> users_name; // …

Member Avatar for Stefano Mtangoo
0
274
Member Avatar for grahf23

Hi, i'm supposed to write a function, countGrade that takes in the Grade and find the number of students that have this grade. This value is returned to the calling program. The function prototype is int countGrade(char). Currently all i have written is this. Seem like there's something wrong with …

Member Avatar for grahf23
0
155
Member Avatar for XodoX

Hello, it's been a while since I took my last programming class, and I must say I don't know how to do the following. I want to create a program that pulls data from a txt file and then lists that data. The data is simply C++ variable names, reserved …

Member Avatar for XodoX
0
194
Member Avatar for PixelExchange

Does anyone know the event that causes the carriage return animation to play? I would like to have the carriage return animation to play after clicking in a box.. that is not a textfield. Essentially.. I am attempting to create a custom text field. (In case you do not already …

Member Avatar for PixelExchange
0
143
Member Avatar for Aneurinbiker

Hi I'm learning C++ as a beginner through the book "C++ Primer by Stephen Prata". I have just learned a bit about creating my own functions and I'm now doing some practice at the end of the chapter. The problem is I'm meant to make output of: "Three blind mice …

Member Avatar for NubTruck
0
188
Member Avatar for dexter1984

Hi guys, need some help with this. I googl'ed but found no solution. :icon_sad: [CODE=cpp] #include <iostream> #include <ctime> #include <cstdlib> using namespace std; void createRationalNo (int, int); int RationalInfo (int []); //void printArray (int [], int); const int MAX = 20; const int setArray = 5; int initialArray [setArray][MAX]; …

Member Avatar for Maxwell175
0
139
Member Avatar for xshinichix

[CODE]#include<stdio.h> #include<conio.h> void main() { int a; printf("\nEnter number of inputs: "); scanf("%d", &a); for( int x=1; x<=a; x++ ) { for( int y=a-x+1; y>=1; y--) { printf("%d",y); } printf("\n"); } getch(); } [/CODE] im still a noob. i know the output of this one. but i cant seem really …

Member Avatar for XMasterrrr
0
174
Member Avatar for xshinichix

TURBO C ++ HELP! INTERATIVE STATEMENT Im a beginner so please help me. USING FOR LOOP: write a program that will display the following pattern, given the value of n. example: of n=4 output: 1234 123 12 1

Member Avatar for xshinichix
0
378
Member Avatar for ms_farenheit1

I am working on an application and would like to be able to calculate the efficiency of various algorithms and choose the best one. The application operates on a list of records that are stored in a file. Operations include adding records, deleting records, and searching for records based on …

Member Avatar for Ancient Dragon
0
145
Member Avatar for LuciaP

Hello! First of all, excuse me for my bad english! Im new in C++ (altough i have to implement a mix between c and c++) and im having troubles trying to do a few things... struct nodo { Program * prog; int FB; nodo * izq; nodo * der; } …

Member Avatar for manojwali
0
112
Member Avatar for KimJack

Hello all, I really need some help with this problem. I am writing a program that needs to count the number of words in a string display the longest word in that string display upper and lower cases and punctuations I have everything complete except displaying the longest and shortest …

Member Avatar for genext.brite
0
2K
Member Avatar for evilsilver

ok guys heres the problem (by the way i am a beginner programmer so don't laugh at the code lol) i keep getting this declaration syntax error whenever i try to compile this program (i also get a declarations missing; and compound statement missing} ) but everything in my code …

Member Avatar for az-zahra
0
372
Member Avatar for alex k
Member Avatar for bmos31

I'm writing a code that takes a 5-bit binary string from a file 'message.txt', converts it to integers. The encoded letters are assigned numbers starting with a=1, b=2, etc. So if the original letter is 'a' and the key(fixed number of spaces) is 2, the encoded letter is 'c' which …

Member Avatar for bmos31
0
489
Member Avatar for chubbs1900

Hey guys, I am trying to self teach C++ and I am to the point of loops. Now I was working on how to create a triangle with manipulating nested loops to create a triangle with numbers. Here is the code I have ended up with: [CODE]/* Print a number …

Member Avatar for usman.rose
0
308
Member Avatar for johnsign11

Hello friends Can anyone tell me Why and How to use vector in C++ ???? Making a sudoko game in c++

Member Avatar for manojwali
0
154
Member Avatar for jelinky

this is the exact instructions: "The program will grade a series of exams and then print a grade report for students in a course. Input: An instructor has a class of students each of whom takes a multiple-choice exam with 10 questions. For each student in the class, there is …

Member Avatar for VernonDozier
0
188
Member Avatar for AutoC

Hi, I have data coming over a socket that looks like this [code] (h)(int,char,float,int,char)(/h)(d)(2,a,1.32,45,d)(3,d,3.45,32,a)(/d) [/code] the datatype of the data arriving is dynamic and is only known when the header is received.I then have to create corresponding vectors(stl) to store the data. In this case, 2 int,2 char and one …

Member Avatar for Ancient Dragon
0
84
Member Avatar for i_luv_c++

hey guys, i am working on a code..code runs fine however there is lot of input on the screen thus i am using a pause function to freeze the screen till user hits enter key. however function always skips the first time and works fine after that. i used cin.clear() …

Member Avatar for Ancient Dragon
0
91
Member Avatar for sudoku43

Hi all. Can anyone give me the ideas how to maneuver a snake in Snake game? I currently trying to do a snake game from scratch. Hope someone can give me an idea. TQ.. :)

Member Avatar for daviddoria
0
101
Member Avatar for Ancient Dragon

short program that will build a stl::list of directory names and all the files they contain. recursively calls itself when a new directory is encountered. This has been compiled with both VC++ 6.0 and Dev-Shed compiles on MS-Windows XP Pro. It will not work on *nix or probably MAC computers. …

Member Avatar for ll_MORTAL_ll
0
850

The End.