49,761 Topics
| |
I need help in writing a C++ program that converts 24-hour notation to 12-hour notation. (For example, it should convert 14:25 to 2:25 P.M. The input is given as two integers. There are three functions: one for input, one to do the conversion, and one for output. Record the A.M./P.M. … | |
Hi everyone and thanks in advance for the help. I have the following class that throws an error on compiling where i declase a vector of pointers I have an Engine class that I want to host multiple scenes objects stored in the vector sceneList and then pass which ever … | |
Write A program that reads a statement of c++ langauge and prints a table of tokens and classes (keyword, identifier | |
Hi, I need some help with starting a program. Kind of lost on how to begin it, any guide to start it would be helpful. Here is the link of the program: http://home.earthlink.net/~craie/122/labs/strfind.html I need to do all the different levels for this program. Thanks | |
I have to take two arrays, put them in a function, and then put them into a file. I have no problem actually making the arrays, but I am not quite sure how to go about defining the function for both arrays. I appreciate any help! #include "stdafx.h" #include<iostream> #include<fstream> … | |
After I enter first name then program fail. Error: RUN FAILED (exit value 1, total time: 2s). I use Netbeans #include <iostream> using namespace std; struct Student { char * firstName; char * lastName; char * telephone; }; void printStudent(Student s) { cout << "Student info: " << endl; cout … | |
I tried fixing these errors but to no avail. Can someone please explain to me what I need to do to fix them? #include <iostream> using namespace std; int main() int arr_3d[4][3] = {{1}, {1, 2}, {1, 2, 3}, {1, 2, 3, 4}}; int row, col; for (row = 0; … | |
i have a question is there line of code or any code that restricts the user from inputting any letter or number or any key to my choice, but in a way that when he presses any letter and i restricted the alphabet keys then nothing will happne, or if … | |
i can't fix my errors. please help me out... here's the ITEMTYPE part of my code: //itemtype.h::::: #ifndef ITEMTYPE_H_INCLUDED #define ITEMTYPE_H_INCLUDED class itemtype public: itemtype(); void print()const; void initialize(int number); private: int value; }; #endif //itemtype.cpp:::::: #include "itemtype.h" #include <iostream> using namespace std; itemtype::Itemtype() // this is the line where … | |
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 … | |
plz community members, am a new student in programing and i would wish you people help me write a programme : that accepts marks in five subjects for a student and stores them in an array.The programme then computes the avarage and grades of the student using the scheme below. … | |
how can we pass the value of an array without using index of an array i.e subscript([]). | |
I just have installed VS Ultimate 2013. When I compiled a simple code, it had an error LNK1104: cannot open file 'kernel32.lib' I tried to follow instructions on internet but it didn't work. My code #include <iostream> using namespace std; void main() { int x; cin>>x; cout<<x; } | |
\cs2370week8\cs2370week8Assign\cardDeck.o" c:/program files/codeblocks/mingw/bin/../lib/gcc/mingw32/4.7.1/../../../libmingw32.a(main.o):main.c:(.text.startup+0xa7): undefined reference to `WinMain@16' collect2.exe: error: ld returned 1 exit status Process terminated with status 1 (0 minutes, 7 seconds) 1 errors, 0 warnings (0 minutes, 7 seconds) | |
Ok I really need this to fix up. And I've been awake all night just to fix the error. Can you help me with this errors. #1 Binary2Decimal() when I input a binary number it won't give an answer and it will skip the "Decimal Equivalent is: " it will … | |
I redid the code again but this time I get an error c2061 identifier 'cout'. Someone explain to me this. I am pretty new with C++ I highly appreciate it. #include <iostream> #include <cmath> using namespace std; const double pi = 3.14159265; int main () { string name; string homework; … | |
I have designed a programme that allows you to enter a number wich is then displayed in various forms however I am stuck with the code to convert the entered number into text can someone help? Below is what I have so far #include <stdio.h> #include <stdlib.h> #include <iostream> using … | |
Hi guys! I have to write a code that checks to see if the password entered meets certain criteria and if it does not the whole function is supposed to start over. The criteria are that it must be atleast 12 characters and must have one upercase letter, one lowercase … | |
Write a program that tests a string is accepted or rejected according to a certain Finite State Machine (FSM). The program must read the FSM before testing the input string. | |
**hey guys, well i just want to get alittle help on something, so this is my prob, i finally got the first .txt files to be made by spereating them depending on there id numbers, which in short through each new employee is another new .txt file created, but the … | |
I need help with this c1075 error. Everytime I build it I get this error any idea what I did wrong? I appreciate it #include <iostream> #include <cmath> using namespace std; const double pi = 3.14159265; int main () { string name; string homework; name = "Randy Calhoun, Giannis Combe, … | |
OK so I'm almost done with my program. How to put this in function like putting each case like void Binary2Decimal() , void Octal2Decimal() & , void Hexa2Decimal() in "TURBO C++"? Call a function like I only want to display only the Binary to Decimal case. #include<iostream.h> #include<conio.h> #include<stdio.h> char … | |
Hello, is this for loop possible? Im trying to get each new value for for(a;a<sum;a++) sum variable. After countless tries i am stuck and don't think it's possible to change that... When sum = sum + laikai[i+1]; exists compiler CMD window is not responding and checking for solution... Help would … | |
Hi I need help to correct this program :( NOTE THIS IS "TURBO C++" #include<iostream.h> #include<conio.h> #include<stdio.h> char value; char t, u, v; char answer; void Binary2Decimal() { gotoxy(1,17);printf("[BINARY TO DECIMAL CONVERSION]"); char b2,f2=1,d2=0; gotoxy(1,19);printf("Enter a Binary number: "); scanf("%d", &b2); printf("\n\n"); while(b2>0) { if((b2%10)==1) { d2=d2+f2; } b2=b2/10; f2=f2*2; … | |
please help me with the solution just the beginner level solution | |
In the last few days, I have noticed a very old thread ... resurrected ... about a non-standard C getline function. To all who may like a C readLine function ... a C function that reads in a dynamic C string of any length ... a function with a similar … | |
can this thing below work????? {#include<iostream.h> #include<conio.h> #include<stdio.h> char value; char t, u, v; char answer; void Binary2Decimal() { switch(t){ case 'a': //ok cout<<endl<<"[BINARY TO DECIMAL CONVERSION]"<<endl; cout<<endl; long b2,f2=1,d2=0; cout<<"Enter a Binary number: "; cin>>b2; cout<<"\n\n"; while(b2>0) { if((b2%10)==1) { d2=d2+f2; } b2=b2/10; f2=f2*2; } cout<<"Decimal equivalent is: "<<d2<<endl; … | |
SO MY PROB HERE IS JUST PLAINLY THE BACKSAPCE FEATURE OF MY PROGRAM EVERYTHING WORKS FINE EXCEPT FOR THE FACT THAT THE PROGRQAM IS CONSIDERING THE BACKSPACE KEHY AS PART OF THE CHARACTERS. int verification2() { system("cls"); char userChar[100], choice = 'Y', input, passChar[100]; for (int i = 0; i … | |
Hi, I need some help with sorting my string comparison. Bascially what I have to do is this: To have numbers sorted properly even when they aren't justified with leading 0's: 1 2 ... 9 10 Instead of: 1 10 2 ... 9 Also to have numbers sorted properly even … | |
Hello everyone Am actually a newbie and learning C++ on my own. Have been trying to generate a code that prompts a student to enter his/details and after finishing. it couts his/her information. And prompts another student data to be entered. i have already some simple code here but it’s … |
The End.