18 Topics

Member Avatar for
Member Avatar for adoleh

I have to create a program that asks a person to enter a 2 digit number (10-99) and convert it into words. I've been working on this for days and I still don't see what I'm doing wrong! PLEASE HELP ME!!! EXAMPLE: 27 twenty-seven [CODE]#include <iostream> using namespace std; int …

Member Avatar for emsmary
0
16K
Member Avatar for clarkkent021

Hi, I am trying to learn OOP with c++ with the help of Turbo C++ version 3.0 and "C++ Primer Plus" by stephen prata. according to the book, the NEW convention for including the iostream header file in c++ is in the following way: #include<iostream> but it causes an error …

Member Avatar for Aatulya
0
2K
Member Avatar for Mr.M

Hi Guys. First of all is it possible to detect a file copying/moving within the system, I'm sure this is done in lower languages like C++ but I've tried searching but I don't seem to find not even en example, maybe it because I don't know how it correctly called. …

Member Avatar for pritaeas
0
1K
Member Avatar for DS9596

How would I fix something like this: It is without the is a vowel or is not a vowel, still doesn't work but how do I fix it? This is what it Today Is Thr Jan, 2015 Enter a sentence: #include <iostream> #include <iomanip> #include <string> using namespace std; int …

Member Avatar for DS9596
0
401
Member Avatar for Labdabeta

Hello, I have a bug in my program somewhere and I cannot understand why. The program merely prints data from a binary file. Here is the code: #include <iostream> #include <fstream> #include <vector> #include <cstdint> using namespace std; int main(int argc, char *argv[]) { if (argc!=2) { cout<<"Invalid argument count, …

Member Avatar for Labdabeta
0
409
Member Avatar for Labdabeta

Hello, Looking at the standard streams provided by the stl libraries, it seems as though it is impossible to have 1 stream to use for both standard console IO and file/string IO. However, before I give up I would like to ask, is this possible: generic_stream stream; stream=cin; //now I …

Member Avatar for Labdabeta
1
510
Member Avatar for SWEngineer

I'm using "Digital Mars" to compile the following program: [CODE] #include <iostream> using namespace std; int main() { cout <<"My name is Abder-Rahman"; return 0; } [/CODE] And, this is what I get: [CODE] C:\Users\Software Engineer\Desktop\C++\dm852c\dm\bin>dmc print1 Fatal error: unable to open input file 'iostream' --- errorlevel 1 [/CODE] Any …

Member Avatar for abelard.louvel
0
758
Member Avatar for muhammad_43

Nice to meet you, i am a newbie i would like to ask a question that bothers me out : 1).How to add the decimal representation of N! (5 <= N <= 1,000,000) is simply the multiplicity of the prime factor 5 in N! to my script? 2). I wanted …

Member Avatar for JamesCherrill
0
245
Member Avatar for Mathias_1

I'm trying to create a program where I can print output to my console application and entering test without being override. Is there anyway to accomplish this? Here is my simple code showing my issue: ` #include <iostream> #include <thread> #include <Windows.h> void myThread() { while (1) { std::cout << …

0
164
Member Avatar for michaellooks
Member Avatar for michaellooks
0
127
Member Avatar for Jorox03

I am trying to add a comma to the end of each line ('\n') of a text file til the end of the file is reached. I am opening the file in append mode but am unsure as to how to go about identifying when the end of line is …

Member Avatar for Jorox03
0
3K
Member Avatar for tristanhall

I'm trying to make a program for my computer science class and it requires that I run output to the console as well as to a file. I'm looking for a way to intialize a string at the beginning of the program and pass the variable by reference to my …

Member Avatar for tristanhall
0
301
Member Avatar for nah094020

So i just started my project on a cpu sim , but right of the bat i ran into a problem #include <cstdlib> #include <fstream> #include <iostream> using namespace std; /* * */ int main(int argc, char** argv) { return 0; } void cpu() { } void memory() { int …

Member Avatar for nah094020
0
495
Member Avatar for Everlight

Hello, I have the following code: `#include <iostream.h> void main() { double test=3.46578953218549; cout.setf(ios::dec); cout<<test; }` I understand that iostream.h is outdated and Microsoft Visual Studio has iostream. However, When I remove the ".h" the setf, ios, etc, line 6 has multiple errors. So, my question is: How do I …

Member Avatar for Everlight
0
3K
Member Avatar for samohtvii

Hi all, I have a simple program: #include<iostream> using namespace std; 6 int main() { char x; do { scanf("%c", x); } while (x != 'y'); return 0; } and for some reason when i gcc test.c i get "test.c:1:20: fatal error: iostream: No such fiel or directory compilation terminated." …

Member Avatar for Ancient Dragon
0
713
Member Avatar for Zssffssz

Ok how would I make a program take one file (thats not a text file) and save with a different name like there is a file with asdf.7z and I want the program to save a copy of it as qwer.7z how? And is there any way to do something …

Member Avatar for raptr_dflo
0
148
Member Avatar for RyanMcMillan

How Would i be able to check for valid input on cin or getline heres what i have [CODE] #include <iostream> #include <string.h> using namespace std; int main() { string word; getline(cin, word); cout << word; system("PAUSE"); return EXIT_SUCCESS; } [/CODE] what i mean by valid input is either if …

Member Avatar for Fbody
0
534
Member Avatar for techningeer

I am using the CodeLite IDE. I compiled the following program using CodeLite (It is a C++ program): [CODE]#include <iostream.h> int main() { cout << "Hello World\n"; return (0); }[/CODE] It returns this message: g++ -c "/home/keagan/.coding-work/Hello/printamessage.cc" -g -o ./Debug/printamessage.o "-I." "-I." /home/keagan/.coding-work/Hello/printamessage.cc:1:23: error: iostream.h: No such file or directory …

Member Avatar for techningeer
0
365

The End.