- Strength to Increase Rep
- +6
- Strength to Decrease Rep
- -1
- Upvotes Received
- 6
- Posts with Upvotes
- 5
- Upvoting Members
- 5
- Downvotes Received
- 1
- Posts with Downvotes
- 1
- Downvoting Members
- 1
Re:
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. … |
|
This is my solution for generating prime numbers. With this code hopefully you can generate prime numbers with incredible speed. The generated numbers will be stored in a text file titled as "Primes.txt". I have a dual core machine, but this program does not support dual core architecture, so it … |
|
Alright no more prime number generators I promise, but I had to fix the last one... This one uses the Sieve of Eratosthenes algorithm. It can generate prime numbers even faster, than the previous version. 1 million prime number in 2,331 second, ten million prime number in less than 22 … |
|
Greetings! So my question is: Is it possible to create your own data type? Not a class, or a structure, that builds from predefined C++ types, but your very own. For example a 128bit integer type, or a very very long floating point data type, or a binary number type … |
|
Re:
Can anyone help me i dont understand this at all! |
|
Re:
Hi, I have written a c++ program which takes a word and prints a list of all possible words that can be formed from it. I want to create a .exe file which can serve this purpose for me. By that I mean, I don't want to always compile and … |
|
Re:
Hi all. I'm a novice with C++ and I'd like to make a program that will present the user with a series of exam questions, most of which are numbers but some of which are descriptions. I want each question to repeat until the user enters the correct response (but … |
|
Re:
The program compiles but it only shows the addresses of myDate.year not the year that I input. [CODE]#include <iostream> using namespace std; class Date { friend ostream &operator<<( ostream &, const Date & ); friend istream &operator>>( istream &, const Date & ); private: int day, month, year; }; istream … |
|
Re:
hello ppl im new to C++ i was making a small newbie math quiz.. and was wandering how can i make it that at the end it says how much u got out of 10 or watever this is my code so far [CODE]#include <iostream> #include <cstdlib> using namespace std; … |
|
Re:
Please help me with this code! Here is the assignment. Project Specifications: Each part of this assignment is a piece of the next part--it builds upon itself. You should submit each part as a separate program. But, the final program is a complete program built upon all the other parts. … |
|
Re:
I'm working on a rather big program. Everything works fine:) , until I added this simple code: [CODE]int counter_x = 0; int* x = new int; for (int a = 1; a < plain_len; a++) //plain_len: int { int b = a; while ( b != 0 ) { x[counter_x] … |
|
Re:
hello everyone,I must solve a problem which effect my c programming lesson grade...Here is the problem: Write a program to convert a time given seconds to hours,minutes and seconds format. Sample Run: Enter seconds: 8230 It is 2 hours, 17 minutes ,10 seconds… We learned only #include<stdio.h> not iostream or … |
|
Re:
i m making a hotel database management system and i have to add records, update and delete them.i m having problem in getting the input,how will i use double pointers?? and i have to get a certain number of records from the user. here is my code: [CODE] void addcustomer() … |
|
Re:
i m having so many problems,i m trying to make an hotel database management program in win32 console and i m not allowed to use structures,only variables or pointer or Dynmaic arryas. i m using 2d dynamic array,i have to pass it to a function to store values in it,i … |
|
Re:
How do you find the length of an int array?? I have int array with some values and I need to count how many values are there? I tried a lot of things like strlen(); sizeof(); etc.. [code=c++] int main() { int iarray[10000]; // Now I have a lot of … |
|
Re:
I'm writing the class for the N-ary tree and I need to finish it with a destructor. For my tree, all I do is insert, traverse, print, and destruct it basically. The part of the code dealing with it will be something like: [code]while (/*not at end of input*/) { … |
|
Re:
int *p; int *q; p=new int; *p=35 q=new int; *q=62; p=q; cout<< *p << ","<< *q<< endl; What is the value of `*p` and `*q`? Why? the statement p=q refer to? |
|
Re:
I dont know whether this is the right place to post this question but I think you guys have huge experiences so... I had a course on both algorithms and software engineering , and now I feel that I can devote my time to only one of these( as these … |
|
Re:
hi.. i'm trying to creat a game on c++ that store some words with at least seven letters in an array, and to randomly select one word and jumble up the letters and display the jumbled-up word. like.. PROJECT can be jumbled-up as CJEROTP The player has to guess the … |
|
Re:
[code] Computer::Computer() Computer::~Computer() void Computer::setspeed ( int p ) [/code] what is this 3 sentences mean? what is the purpose we use it? i have asked my friend but still a bit blur. pls help.thanks. |
|
Re:
I'm fairly new to C++ programming and I would like to ask you a (maybe strange) question... The code below compiles correctly with both: - the latest MinGW-compiler - Borland C++ Builder Compiler 5.5 (from the free Command Line tools) However if I run the program (after compiling with the … |
|
Re:
i need to create a palindrome program. in our computer lab, this program works but here at home, it doesn't. help.. [CODE=c++] #include<iostream.h> #include<conio.h> #include<string.h> #include<stdio.h> int main() { clrscr(); char word[20],rev[20],chr; cout<<"This porgram checks if the word is a PALINDROME word.\n"; do { cout<<"\nEnter word: "; cin>>word; for(int i=0,j=strlen(word)-1;i<=j,j>=0;i++,j--) … |
|
Re:
Hi guys. I was wondering if you could help me with this code. I am trying to open a file and read character by character. The program compiles but when I run it it aborts with an access violation while reading from the file. I made the program output the … |
|
Re:
hi can anyone pls suggest me website through which i can safely download a c++ software? |
|
Re:
I have to find the sum of the prime numbers below 2million so here is the program that i have written. [code=c++] #include <iostream> using namespace std; bool is_prime(int); int total=0; int main() { int num=2000000; for(int x=1;x<=(num);x++) { if(is_prime(x)==true) { total+=x; cout<< total<<"\n"; } } cout<< total; return 0; … |
|
Re:
can anybody help me? i am new in c++.please.. ++ -- *= += -= |
|
Re:
I'm trying some code with classes but get these errors: overloaded member function not found in 'Point' 'Point' : no appropriate default constructor available [CODE]#include <iostream> using namespace std; class Point { public: Point(float f_x, float f_y, float f_z); private: float x, y, z; protected: }; Point::Point() { cout << … |
|
Re:
[code=cplusplus] #include<iostream> #include<list> using namespace std; int main() { list<int> dob; for(int i=0;i<5;i++) { dob.push_back(i); } for(int i=0,list<int>::iterator itr=dob.begin();i<3;itr++,i++) cout<<*itr; return 0; } [/code] errors-- test.cpp: In function `int main ()': test.cpp:17: `iterator' specified as declarator-id test.cpp:17: extraneous `int' ignored test.cpp:17: `int list<int, allocator<int> >::iterator' is not a static member … |
|
|
Re:
Hello guys, I'm new here and hoping to get some kind of help with my code. This code is to calculate sales tax for specific store. I've got the most part of the code working, but I have to modify it so that it continues to loop until the user … |
Re:
Hi, I could use some help. Our class assignment is to create a mortgage calculator in C++. The calcuation was provided all we had to do was code it. This is the fourth week of class and the assignment is from Ch. 2. I am sure it is not supposed … |