51,593 Topics
![]() | |
ok, i am new to c++ and i am trying to build a digital sound genorator using Beep(x,x) this may sound like a trivial question but it is one i am having difucutty with. (perhaps i am entering the wrong search peramiters) how to you make a visual c++ consol … | |
ok, i am just learnig c++ and i was wondering if it is possible for a feature in a program to be actavated by a certain sound. for example i run this program below on one computer and another program exacutes a function when the sound at 1000hz is herd … | |
I just started with the class vector, but it didn't go so well. :( I tried this: [CODE]void Initialize() { int amount_of_char = 62; vector<char> char_table; for (int i = 97; i < 122+1; i++) // 97 -> 'a', 122 -> 'z' char_table[i] = char(i); for (int i = 65; … | |
First of all Im new to all of this Windows Form Applications in C++, as I've only worked with Console Projects in C++ before. A few days ago I started reading on Windows forms, quite intense, and now I'm "converting" an old network winsock console program into a Windows Form. … | |
Hello everyone. I have been reading c++ in the book "C++ : A beginners Guide" and I have some questions about overloading a unary operator. This is the code I have been working on/trying to understand : /* Demonstrating overloading a unary operator with a friedn function(prefix and postfix) */ … | |
could you please tell me how can i create c++ rapi application? | |
Hey folks, I've been reading: [url]http://www.codeproject.com/KB/IP/cs_remoting.aspx[/url] Now, I havn't actually done anything in the article yet however a question springs to mind. I have an app that has non-decoupled UI and business stuff (probably not the best). In time, I would like to make this app run on a "Software … | |
i have problem with strings is that i read a string from file and save it into another string and then compare with the another string which user enter ....basically i am going to design a login system in which first administrator make your user name and u set a … | |
take a look at this code: [CODE] template <class T> class C { public: class A { protected: int x; }; class B: public A { protected: void write() { cout << x << endl; } }; }; [/CODE] when I try to compile with g++ i get: test.cpp: In … | |
Is there any better way to define PreviousDay Function??? plz let me know.. [code=cpp] enum weekdayT { Monday,Tuesday,Wednesday,Thrusday,Friday,Saturday,Sunday }; weekdayT NextDay(weekdayT day){ return weekdayT((day+1)%7); } weekdayT PreviousDay(weekdayT day){ if(day==0) return weekdayT(day+6); else return weekdayT((day-1)%7); } [/code] | |
hi friends, i would like to know how to highlight text in dialog's Edit box and List box. Is there any mfc api for that ?? | |
Hello, I want to display in a textbox, the message what appear with the printf in console. I have a program in C++ and an interface. Thank you. | |
Hey all, I'm sure this is a stupid question but I have looked and I cant find :( . i am creating a dialog resource in MFC and i cant find the Controls toolbox. The first time i created a dialog resource the controls toolbox came up automatically but (stupidly) … ![]() | |
Hello guys,can someon tell me is there any book for c++ on win32 programming,or some good tutorial,i know the WinForger tutorial but if there is some other tutorial please give me the link ! And if there is some book please give me her name :D ![]() | |
this is the instruction: //Prompt the user with this menu: 1. Linear Search 2. Binary Search 3. Exit Item 1 is similar to Exercise 1's item 5. This time however, the linearSearch function must be implemented using recursion. Item 2 is what we call the Binary Search. As discussed, the … | |
So I was coding along working on another dll, I recompiled a dll containing the following code and suddenly my program was crashing, when i clicked the show info link on the 'send this report to Microsoft' dialog box, it said the dll which was throwing the error was msvcp90d.dll, … | |
Hi All, I am trying to use z-buffer (also known as a depth buffer). I have researched this online and in books but all I have found so far is a brief description and then they throw an equation at you. The last line is usually, "it is very easy … | |
Sup guys...I tried to make a little program my brother asked for to try and increase his odds of winning the lotto! lol... anywho, It compiles and runs fine on my computer, but I tried it on two different computers running XP, and it doesnt work =( Both computers I … | |
Iam doing my comp engg in india...we arent taught C in extreme detail in our univ...is it crucial or wil it make things very simple for me in the future if i make sure i get a high level training in C at this initial stage? | |
i want to add a line at run time in title, but i m unable to do so.. in main() getline(-,-) is working fine but not in the below code, it simply skip it when i put values for Course Name and press enter it go to the next line … | |
i am working on this program for a while need some help/input/miracle.... [code] #include <fstream> #include <iomanip> #include <cstdlib> #include <iostream> using namespace std; class Report { private: char id [12]; char name [20]; double midterm, f1, p1, p2, p3,cp; ifstream in_file; public: Report (); ~Report (); void print_heading(); void … | |
Hi every one, I am a doctor have a interest in programing ,actually i have been trying to practice on switch statements but i was unable to display numbers like 365 in words "Three hundred and sixty five", i actually faced problem, all what i was able was to display … | |
So we were in class today and my professor said that, while iterating through a linked list you can use the ++ operator to get the next node. Here's an example linked list... [code] #include <iostream> using namespace std; class Node { public: int data; Node * next; }; class … | |
Hi, Im trying to move mouse and click inside another window to automate a mundane task. Im testing it on a paint window. I can send keyboard entires fine but cant seem to get the mouse working. What am i doing wrong? [code=C++] #include <windows.h> #include <stdio.h> int main() { … | |
Hi, I want datagridview in windows application(C#.net), type in "this is the first line allows the 50 char", if you press "letter" and type "this is the second line", the current cell and go to the cell right below it. What I want is, when I press "letter" and type … | |
Just few quick question: How often are pointers to functions used? Should i implement them in my programs? | |
I want to compare my password with the stored password but it don't compare correctly. WHY? Please someone correct it. [code] #include <iostream> #include <string.h> #include <conio.h> #include <cstdlib> using namespace std; int main() { string my = "programming "; string pass = ""; int s; int a; cout << … | |
Hi, I was curious if I could return a vector from a virtual function. I keep getting an error for this. [CODE] Class A { public: virtual vector<int> getSomeStuff(); private: } .cpp File vector<int> A::getsomeStuff() { return; } [/CODE] Can anyone tell me what I am doing wrong? ![]() | |
I have found out that goto is bad in C++? Why? I just got a book the other day (for my birthday :)) and it says it is fine to use. Also the book doesn't use brackets ({}) these things around else (statement?), I can see why that is a … | |
I am having trouble removing the errors listed below please help [code=cplusplus] #include <iostream> #include <fstream> #include <cmath> using namespace std; class rational { public: rational(int num, int den); rational(int num); rational(); int getnum(); int getden(); void input(istream& in); void print(ostream& out); bool less(rational r); rational Add(rational r); private: int … ![]() | |
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 … | |
Hi, We are into Reports development using C# and PDF Library (for front end). The development is done in Visual studio 2005/2.0 framework. Now since the production has 1.1 framework, I was asked to "downgrade" to VS 2003. The problem is we have Tuple/generics in 2.0. After I recreated the … | |
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 … |
The End.