49,761 Topics

Member Avatar for
Member Avatar for yun

I m surprised and wanna know that how the compiler understand the sequence of how data was entered. as i didnt use any space any tab not a new line, how it can point to the original value from a single line..????????? find.txt contain the following line with out spaces …

Member Avatar for Ancient Dragon
0
176
Member Avatar for pmankow

Hello, I am looking to make a program that will generate prime numbers. The program has to start at a specific number, ex: 3698741 and then end at another specific number, ex: 9874123. The numbers may never have duplicate digits, ex: 9874122. There will be a set of rules as …

Member Avatar for WaltP
0
104
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
105
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
141
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
81
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
335
Member Avatar for serkan sendur
Member Avatar for serkan sendur
0
228
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
118
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
142
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
277
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
167
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
43
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
66
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
45
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
138
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
101
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
154
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
195
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
230
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
133
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
307
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
174
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
121
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
254
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
181
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
184
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
165

The End.