7 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for nathan.pavlovsky

Hello Programmers! I am working on a C++ phone number class. The class has overloaded stream manipulators, cin and cout for output. It has three private members: areaCode, exchange, and line, strings that represent the numbers that are used in a telephone call. It is supposed to default to (000) …

Member Avatar for 2teez
0
574
Member Avatar for nathan.pavlovsky

Hellp programmers! I am working on a program that uses two objects of a custom class template List [which is a linked list, with each item pointing to the next] and concatenates them. Initially, I need to input numbers into my main function, so I have two sets of while …

Member Avatar for nathan.pavlovsky
0
4K
Member Avatar for learner_new

#include<iostream> using namespace std; int main() { int len1; cout<<"please enter the length of arrayn 1"; cin>>len1; cout<<"creating array now"; int *arr1= new int[len1]; cout<<"please enter the elements now"; for(int i=0;i<len1;i++) { cin>>arr1[i]; cout<<endl; } return 0; cout<<arr1; delete [] arr1; } In the above code, the program stops execution …

Member Avatar for shaykhhamza
0
293
Member Avatar for Lucaci Andrew

I have this function: void read(){ int id; string desc; string title, type; cout<<"Movie's id: "; cin>>id; cout<<"Movie's title: "; cin>>title; cout<<"Movie's description: "; getline(cin, desc, '\n'); cout<<"Movie's type: "; cin>>type; cout<<"You have typed in: " <<id <<" " <<title <<" " <<desc <<" " <<type <<".\n"; } and my …

Member Avatar for Lucaci Andrew
0
272
Member Avatar for isaacjun16

Hi, I have a problem with a the imput of some data on a program Im making (FYI new in c++, homework). So basicly the progrma I have is to imput diferent type of data, this is what im doing. (Im using codeblock 8.02 in Ubuntu 10.04 ) #include <iostream> …

Member Avatar for isaacjun16
0
265
Member Avatar for jcAmats

hi! can someone help debug my codes? getline() works properly in my main() but if i'm putting it to another function, it ignores the first getline() w/o entering any words and goes to the 2nd getline. my program works like this: i have a menu() that lets the user to …

Member Avatar for jcAmats
0
363
Member Avatar for jackmaverick1

Hi, I'm very new to Java (started today, though I have 1.5 years in c++) and I've now read a little bit about Java, the thing that I can't find is how to take user input from the keyboard through a console window... How can you go about do that? …

Member Avatar for sourabh17
0
193

The End.