49,761 Topics
| |
hello; can we say this when defining an enumeration : enum letter{A=4,B=3,C,D,E}; i mean give letter B value smaller than the value of the letter A , is it possible ? and what is the real benifet of the enumeartion in general ? sometimes when making "cout" statement , the … | |
hi all.. ive got a C++ assignment to do. this is what it says: Write a program in C++ that takes input from a text file specified by the user and outputs the following to the screen: • Number of single letter words. • The average word length for the … | |
[code] #include<iostream.h> #include<conio.h> class suitcase { int sno[20]; long double amount[20]; public: suitcase(); void print() { int i; for(i=0;i<=19;i++) cout<<amount[i]<<'\n'; } }; suitcase::suitcase() { amount[20]={0.25,1.0,10.0,100.0,250.0,500.0,1000.0,5000.0,10000.0,50000.0, 100000.0,200000.0,300000.0,400000.0,500000.0,1000000.0, 2500000.0,5000000.0,7500000.0,10000000.0}; } void main() { suitcase s1; s1.print(); } [/code] When I run this program, I get an error :- [quote]expression syntax in function … | |
hi everyone.. anybody can give me feistel chipher source code? i,m in urgent plizz.. | |
Working on a project and stumbled here for help. I am at about 90% of what I need but I am having one small problem. With the exception of one of my "if" sections, my "else" output is triggered and diplayed when I don't want it to be. Just asking … | |
I need to read numbers from a user and then copy them to an array. This shouldn't be that hard but I think I'm making it hard by trying to use [I]getline[/I] and then parsing the numbers. Heck I don't even know how to do that. Is there an easy … | |
Hey there! About a week ago, I started working with C++, just as a hobby. I started working on a Square Root Calculator, just to use it as a reference for my future C++ projects. :) However, when some of my friends were wondering that I could implement 'Pi' within … | |
Have created a simple bingo game, I'm going to add color later (why I have used the SetConsoleTextAttribute). The problem is that the X i replaced by 88, I know why (I think), it's becuse it's a int and not a char, but when i tried to put in (char) … | |
Hiii..... when my program running this message comes.. Windows has triggered a break-point in mypgm.exe This may be due to a corruption of the heap, and indicates a bug in mypgm.exe or any of the DLLs it has loaded Actually in my operation I was copying files... Memory is deleting … | |
Hi guys, i am quite newbie to c++. Is there any way to know object class. I have a object and i want to know the exact class name for that. | |
The .h file traditionally holds declarations and the .cpp file the definitions. The #include inserts the human readable ASCII code that is the .h file, right there at the top before compiling. The main purpose of the .h file was to gather together all the declarations (more even than you … | |
does anyone of you lot know a way to use colors in a program compiled in Dev C++, except for the [code=c++] system("color a"); [/code] function? and I'd also be glad to know another way to clear the screen, then the: [code=c++] system("cls"); [/code] function | |
i have to get an integer out of the unsigned char string and assign it to unsigned int varable.... i mean if i have unsigned char array = { "123"}; i simply want to get either 1 or 2 or 3 out of it and assign it to unsigned int … | |
My friend and I are trying to write a program for my Spanish teacher so that she can just type Spanish words and English words into an application, those words get stored as an array somewhere, and then another program that tests the kids uses that array. The program gives … | |
I'll try to get this as simple as possible. The problem is fairly simple. [code] long double a=100000000; cout<<a; [/code] Well, the output this shows is "1e+08" I do not want the output to be in exponential form. Rather, I want it to be printed as "100000000". What shall I … | |
Hi every body I want to know how i can read a very large binary file in to a character array using c++. I can read the whole file by using fread function but when i go no searching anything in that character array. i cant search. i have used … | |
[code] #include <iostream> #include <cstdlib> using namespace std; int main() { cout <<"enter the problemset and number""\n"; //problems represents name and numbers string problems , probtitle; string xx; bool x=true; char quote; string str1, str2; string begin; //gather name if(cin.peek()=='"' || cin.peek() == ''') { cin >>quote; getline(cin,problems,quote); } else … | |
Hello, I have a question to ask whoever can help me. I've have dev - c++. see I've been using C++ for a while now but i'm still sorta a newbie... i havn't had this problem before but i've been trying to do a password program just to play around … | |
hiii In my program I'm reading the clusters in the volume using the appropriate physical offsets to the disk. [CODE]for( i=0; i< total_number_ of_ clusters;i++) { // convert logical offset to physical offset phys_offset= conversion(i); // this value I get correctly if(!SetFilePointer(drive_handle, phys_offset, NULL, 0)) { printf("\nSetFilePointer Failed: Error Number … | |
HI EVERYONE :D!! This is my first thread. Well today was my birthday! And I got my first computer! I have always wanted one and I have always wanted to start programming! I got a Microsoft Windows XP and a extra external hard drive!! Not the best computer ever but … | |
I have 2 Dell 1420's, both running under Vista Home Premium. One is a few months older than the other. I am running Borland C++ Builder Personal Version 6.0 on both of them. The older computer runs the c++ compiler flawlessly. On the newer computer, however, the debugger isn't working … | |
Hey, I was wondering if anybody had code to implement mscache. Writing an mscache password recovery tool. I know how to use OpenSSL to turn a plaintext into an NTLM hash, but I don't know how to do it from there. Anybody have any idea how to convert the username … | |
Hey guys, I have a problem printing out the contents of a list of objects, with the following code I loop through the list and call the displayInfo() method that it's responsible for printing out the different attributes of the object. I have tested the displayInfo() method and works fine, … | |
I recently installed Ubunty Jaunty (Linux). I checked out the Linux version of the Codeblocks IDE. Obviously things like [code] system ( "pause" ); [/code] didn't work because of the operating system. Is there a library I can include -- or a package I can install -- that will give … | |
Well, I posted a few problems here on daniweb and thank god that I did so. What I had been using till now was "rusted, naff,useless" code. But after today, I am more accustomed to what the new c++ is. Well, I am 16 years old and am studying in … | |
if it contains quote it cuts it out, then i am stuck on part when i just enter in a problemset without a quote or single quote. Then it doesn't gather numbers correctly but stores the entire string [code] int main() { cout <<"enter the problemset and number""\n"; //problems represents … | |
Hello.. can someone teach me how to do this program. This is the question. 1. An organization has aprox. $1000 available to be allocated in small amount to approved charities. Write a program that will read several amounts and ((report as soon as over $1000 has been allocated. << NOW … | |
[code] #include <iostream> using namespace std; #include "Interface.h" #include <conio.h> int main() { apple t; bool quit = false; while(! quit) { cout<<"the original value at beginning of clock is\n"<<clock()<<"\n"; t.start(); cout<<"hit enter when you want to stop timer\n"; if(cin.get()=='\n') { t.end(); int time =t.elapsed(); cout<<"the time difference is\n"<<time<<"\n"; cout<<"enter … | |
Hi everyone. Can anyone please guide me on how can I generate a random number from a group of prset numbers. For example:- There is a group of preset numbers:- 1,5,18,100,127,500,626,929. I want to generate a random number from this group....is there anyway in which we could do this? | |
I am writing a portable desktop for my flash drive as an alternative to the portable "menus" that you can download. I need to know how to drag a link from somewhere on the screen (eg desktop, start menu or windows explorer) and drop it in my program. It also … |
The End.