49,761 Topics

Member Avatar for
Member Avatar for rock9449

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. …

Member Avatar for deceptikon
0
8K
Member Avatar for uonsin

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 …

Member Avatar for uonsin
0
343
Member Avatar for Sara Masri

Write A program that reads a statement of c++ langauge and prints a table of tokens and classes (keyword, identifier

Member Avatar for Ancient Dragon
0
189
Member Avatar for Rashmi_1

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

Member Avatar for David W
0
383
Member Avatar for (Z!Z!)

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> …

Member Avatar for (Z!Z!)
0
200
Member Avatar for buixuanhai

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 …

Member Avatar for David W
0
715
Member Avatar for mary.fatulalohr

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; …

Member Avatar for David W
0
159
Member Avatar for neyoibarra

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 …

Member Avatar for David W
0
129
Member Avatar for neha.jebin.18

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 …

Member Avatar for David W
0
266
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
765
Member Avatar for anyumba kevin

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. …

Member Avatar for Learner010
0
145
Member Avatar for radhakrishnan.akshai.3

how can we pass the value of an array without using index of an array i.e subscript([]).

Member Avatar for rubberman
0
128
Member Avatar for Dang_1

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; }

Member Avatar for Ancient Dragon
0
99
Member Avatar for ManPui

\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)

Member Avatar for mike_2000_17
0
1K
Member Avatar for john.kane.100483

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 …

Member Avatar for john.kane.100483
0
147
Member Avatar for BboyTurok1990

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; …

Member Avatar for JasonHippy
0
269
Member Avatar for Mo90games

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 …

Member Avatar for Ancient Dragon
0
142
Member Avatar for sailorsoldier

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 …

Member Avatar for Ancient Dragon
0
179
Member Avatar for Sara Masri

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.

Member Avatar for rubberman
0
309
Member Avatar for neyoibarra

**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 …

Member Avatar for Ancient Dragon
0
103
Member Avatar for BboyTurok1990

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, …

Member Avatar for vmanes
0
236
Member Avatar for john.kane.100483

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 …

Member Avatar for Schol-R-LEA
0
226
Member Avatar for evaldaskowka

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 …

Member Avatar for evaldaskowka
0
401
Member Avatar for john.kane.100483

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; …

Member Avatar for David W
0
202
Member Avatar for shahirulnizam
Member Avatar for David W

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 …

0
211
Member Avatar for Fadhli_1

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; …

Member Avatar for brett.warren.1612
0
131
Member Avatar for neyoibarra

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 …

Member Avatar for nullptr
0
168
Member Avatar for Rashmi_1

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 …

Member Avatar for Rashmi_1
0
900
Member Avatar for kimanthi

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 …

Member Avatar for kimanthi
0
246

The End.