51,593 Topics

Member Avatar for
Member Avatar for dombit

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 …

Member Avatar for MosaicFuneral
0
106
Member Avatar for dombit

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 …

Member Avatar for MosaicFuneral
0
144
Member Avatar for C++ Obliviator

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

Member Avatar for C++ Obliviator
0
82
Member Avatar for crillegs

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

0
35
Member Avatar for coachHinesfan

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

Member Avatar for Dave Sinkula
0
338
Member Avatar for serkan sendur
Member Avatar for serkan sendur
0
261
Member Avatar for jonnytabpni

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 …

Member Avatar for sknake
0
134
Member Avatar for wasif005

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 …

Member Avatar for wasif005
0
120
Member Avatar for kux

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 …

Member Avatar for kux
0
145
Member Avatar for yun

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]

Member Avatar for csurfer
0
286
Member Avatar for ashishchoure

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

Member Avatar for kvprajapati
0
172
Member Avatar for deexo

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.

Member Avatar for Ancient Dragon
0
44
Member Avatar for colmcy1

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

Member Avatar for jencas
0
70
Member Avatar for XTRobot

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

Member Avatar for jencas
0
46
Member Avatar for iamblaise

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 …

Member Avatar for siddhant3s
0
142
Member Avatar for mOoEyThEcOw

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

Member Avatar for mOoEyThEcOw
1
106
Member Avatar for nu2cpp

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 …

Member Avatar for nu2cpp
0
2K
Member Avatar for VBNick

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 …

Member Avatar for tux4life
0
158
Member Avatar for wxoklp

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?

Member Avatar for csurfer
0
197
Member Avatar for yun

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 …

Member Avatar for pspwxp fan
0
231
Member Avatar for mb1980

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 …

Member Avatar for Ancient Dragon
1
137
Member Avatar for tag5

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 …

Member Avatar for u8sand
0
313
Member Avatar for cbaechle

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 …

Member Avatar for csurfer
1
1K
Member Avatar for Richy321

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() { …

Member Avatar for Richy321
0
178
Member Avatar for kspriya01

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 …

Member Avatar for ddanbe
0
268
Member Avatar for athlon32

Just few quick question: How often are pointers to functions used? Should i implement them in my programs?

Member Avatar for athlon32
0
122
Member Avatar for mirfan00

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

Member Avatar for tux4life
-1
256
Member Avatar for Niner710

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?

Member Avatar for jencas
0
185
Member Avatar for valinux

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 …

Member Avatar for Tom Gunn
0
186
Member Avatar for largedimples

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 …

Member Avatar for jencas
0
169
Member Avatar for Zay

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 …

Member Avatar for Zay
0
125
Member Avatar for veronica_0501

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 …

Member Avatar for tux4life
0
251
Member Avatar for Nikhar

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

Member Avatar for Nikhar
0
104
Member Avatar for freshmem

hi everyone.. anybody can give me feistel chipher source code? i,m in urgent plizz..

Member Avatar for freshmem
0
328
Member Avatar for TheSwagger

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 …

Member Avatar for Ancient Dragon
0
115
Member Avatar for tazboy

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 …

Member Avatar for Ancient Dragon
0
91
Member Avatar for RoninMastaFX

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 …

Member Avatar for jephthah
0
135
Member Avatar for CSharpant

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 …

Member Avatar for Ramy Mahrous
0
227
Member Avatar for kangarooblood

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

Member Avatar for wildgoose
0
2K
Member Avatar for krishnampkkm

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 …

Member Avatar for Salem
0
250
Member Avatar for johnray31

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.

Member Avatar for tux4life
0
125
Member Avatar for walter clark

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 …

Member Avatar for walter clark
0
122
Member Avatar for kangarooblood

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

Member Avatar for Tom Gunn
0
113
Member Avatar for razor1234

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 …

Member Avatar for Ancient Dragon
0
232
Member Avatar for goody11

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 …

Member Avatar for s_sridhar
0
118
Member Avatar for Nikhar

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 …

Member Avatar for s_sridhar
0
110
Member Avatar for ankur shah

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 …

Member Avatar for tux4life
0
127
Member Avatar for lotrsimp12345

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

Member Avatar for WaltP
0
246
Member Avatar for XxGunMastaxX

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 …

Member Avatar for WaltP
0
152
Member Avatar for krishnampkkm

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 …

Member Avatar for krishnampkkm
-1
392

The End.