49,761 Topics
| |
What is the advantages of using assembly language with C++? | |
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> … | |
#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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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; // … | |
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 … | |
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 … | |
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 … | |
| 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 … |
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]; … | |
[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 … | |
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 | |
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 … | |
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; } … | |
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 … | |
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 … | |
How we can randomly generate and store the age of N employees in Arrays plssssss | |
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 … | |
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 … | |
Hello friends Can anyone tell me Why and How to use vector in C++ ???? Making a sudoko game in c++ | |
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 … | |
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 … | |
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() … | |
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.. :) | |
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. … |
The End.