51,593 Topics

Member Avatar for
Member Avatar for knewc

So uh, i need some help with these functions..i gotta reverse, but i do not have the functions that can make it lowercase, or remove punctuation [code=cplusplus] #include <iostream.h> #include <string.h> char your_string[256]; char new_string[256]; void ReverseString(); void main() { cin.getline(your_string, 256); ReverseString(); cout << ReverseString(your_string) << "\n"; } void …

Member Avatar for Ancient Dragon
0
140
Member Avatar for Mark515

Does anyone know code to use asterisks instead of numbers for a password on C++ code?

Member Avatar for iamthwee
0
66
Member Avatar for dgg32

Hi everybody. I come here again to ask for your advise. Thank you at first for all your attention. I have a big text file containing, say more than 10000 letters. I want to write a program, openning it, parsing out each word and compare them with a target word, …

Member Avatar for Aia
0
376
Member Avatar for opendep

Hi, I am using visual studio 8 to create an application. I need to incorporate file browser window in a .cpp file. The code i have only browses the folders and sub folders but does not display the individual files. Can anyone help me with this..? Any help would be …

Member Avatar for opendep
0
317
Member Avatar for dinozulf

i have a program to do which iv found to be quite difficult, can anyone please help me as i will need it to help me do my propa assignment for corse. thank you

Member Avatar for Sky Diploma
0
79
Member Avatar for Nicholas_G5

Hi, I would like to write a function that checks the user input to see if it matches with the allowable inputs. The allowable inputs are stored in a separate text file. [U]User-entered input:[/U] This is the user inpt [U]Contents of text file:[/U] 1. Hello 2. This is the user …

Member Avatar for vijayan121
0
134
Member Avatar for biniamg

how do i write windows service in turbo C++ integrated with assembly language

0
51
Member Avatar for Shinbuki

i've been working on a program that extends the limit of an integer using arrays here is my code so far [ICODE]#include<iostream> #include<string> using namespace std; void sub(); void add(); void mult(); int main() { int operation; cout<<"Please Enter a number"<<endl<<"1.Addition"<<endl<<"2.Subtraction"<<endl<<"3.Multiplication"<<endl<<endl; cin>>operation; if(operation == 1) { add(); } if(operation == …

Member Avatar for Agni
0
97
Member Avatar for taotesea

Open Excel file,Error _ConnectionPtr m_adoConn; _RecordsetPtr m_adoRec; ::CoInitialize(NULL); m_adoConn.CreateInstance(__uuidof(Connection)); m_adoConn->Open("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\\1.xls;Extended Properties=Excel 8.0;IMEX=1;","","",adModeUnknown); stop this function: inline HRESULT Connection15::Open ( _bstr_t ConnectionString, _bstr_t UserID, _bstr_t Password, long Options ) { HRESULT _hr = raw_Open(ConnectionString, UserID, Password, Options); if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); return _hr; } why error thank:)

Member Avatar for fyz
0
191
Member Avatar for MjLaali

Is there any way to pass a class as a function pointer. for example: [code=C++] int compare(int a, int b) { return a - b; } void sort(int *ar, int (*pf)(int, int)) { //a sorting algorithm. } class MyClass { bool condition; public: int compare(int a, int b) { if …

Member Avatar for bugmenot
1
136
Member Avatar for ohhmygod

Hey guys i have a small question here. [CODE] float angle0; printf("\nEnter Original Attack Angle Value in Degree: "); //input angle scanf("%f", &angle0); while(angle0<-180 || angle0>180) { printf("\nEnter Valid Original Attack Angle Value in Degree: "); scanf("%f", &angle0); } [/CODE] i dont get it when i put in 180 it …

Member Avatar for ohhmygod
0
92
Member Avatar for Aamit

Hi.. I want to read and display bios password.I am using phonix award bios v6.00pg version ATi -42302e31 bios Date 04/20/06. operating system-- Xp i can not find actual address where bios password stored in bios chip. if password is set retrieve it and display. Plz tell me is 1d …

Member Avatar for jbennet
0
131
Member Avatar for mrgreen108

After looking at the same few lines for an hour now, I cannot figure out why the user named input file isn't opening and the user named output file isn't even being created. I used the debugger in visual studio 05 to figure out the input file isn't being opened …

Member Avatar for mrgreen108
0
295
Member Avatar for marti3a3

I'm trying to write a program that prompts a user for a radius value, then uses class data to return info of a sphere based on that radius. I believe my problem lies in declaring what information goes into what class member, but I'm not entirely sure. How do I …

Member Avatar for Ancient Dragon
0
95
Member Avatar for pmsilva

Hi, I need to find an expression evaluator for C/C++ able to support my own functions and my own data type definitions. - the expression will typically be parsed once but evaluated many times - the expression result may be of any type, not always float - the expression arguments …

0
49
Member Avatar for Mark515

Could someone tell me the code for a timer like 60 seconds from when the first input is? Also code for a user not being able to enter a password for 1 hour if they have inserted it incorrect? thanks guys

Member Avatar for Ancient Dragon
0
108
Member Avatar for Seamus McCarthy

[code] const int capacity2 = 120; int rows[capacity2]; for (int i = 0; i < capacity2; i++) { if ( x == 11) { rows[i] = 1; break; } else if ( x == 13) { rows[i] = 2; break; } else if ( x == 15) { rows[i] = …

Member Avatar for Seamus McCarthy
0
96
Member Avatar for Seamus McCarthy

[code= c++] #include <iostream> using namespace std; int main() { char A,B,C,D; const char capacity = 120; char letter[capacity]; int pax = 0; int y =6; for (int i = 0; i < capacity; i++) { if ( y == 6) { char letter[] = {A}; pax++; break; } else …

Member Avatar for Seamus McCarthy
0
106
Member Avatar for lAmoebal

Is there a way to copy a whole smaller array into a section of a larger array? For example, if I have an array of 4 characters, and an array of 16, can I copy the 4 characters into the first 4 of the array of 16. Then another 4 …

Member Avatar for Ancient Dragon
0
142
Member Avatar for Mark515

Im trying to find the average of three numbers however it only rounds it to the nearest whole number. What code can i use to get the exact number? For example at the minute it would add 2 + 3 + 2. The outcome would be 2 but i would …

Member Avatar for Ancient Dragon
0
75
Member Avatar for jesseb07

hello, I'm working on a personal project and I was looking for some help. I am writing a program that needs to store user profiles in an external file (.user_data.dat). Problem is that anyone with half a brain can find the file and with any text editor look at the …

Member Avatar for jesseb07
0
106
Member Avatar for Black Magic

Hey guys, i was bored so made a money converter, nothing is wrong with errors etc in the code but when i run my program, the pound sign is not valid, it comes up as a u with a accent on top, please help. [CODE=C++]#include <iostream> #include <conio.h> using namespace …

Member Avatar for Ancient Dragon
0
107
Member Avatar for CoolGamer48

Hey, I keep getting this error: error LNK2019: unresolved external symbol "public: struct IDirect3DDevice9 * __thiscall Engine::GetDevice(void)" when I try to compile my project. MSDN says that IDirect3DDevice9 uses d3d9.lib, but it still won't work even with that lib in additional dependencies. (using VC++ 2008) I tried linking to a …

Member Avatar for CoolGamer48
0
126
Member Avatar for Sparky1208

Hi all, I hope this question is in the correct area of the site. If not, someone please advise. I am creating Excel pie charts using C# Excel Interop. My problem is that my charts (plot area, I suppose) are never in the horizontal center of the chart area. However, …

0
66
Member Avatar for nilesh03

Hi... I just wanted to know how quick sort works... I've got to use it in my assignment, please explain it to me... Thank you...

Member Avatar for hammerhead
0
91
Member Avatar for TuX4020

Hi all, this is my first post here and it comes out of frustration more than anything. I've been searching high and low for any insight into my problem and still can't seem to get it right. In the interest of full disclosure, this is a part of a homework …

Member Avatar for TuX4020
0
3K
Member Avatar for paolomontero

Hi Im having a problem with the following piece of code: #include <iostream> using namespace std; #define something 33; void main() { if (33 == something) { cout << "equals" << endl; } } Im using Visual C++ 2008 (not Express) and I get 2 errors and 1 warning when …

Member Avatar for Salem
0
86
Member Avatar for redclay34

Hi, Does anyone know if there is someway to write something harmless to \\.\PhysicalDrive0 in Windows XP? I have successfully used the ReadFile and would like to try the WriteFile, but then I'd have to find something safe to write to it. Any help would be appreciated. Best regards, MiCo

Member Avatar for Salem
0
88
Member Avatar for noey699

this should b realitivly easy to answer but i need to know how to ask a use for an address to a program (example C:\Program Files\....) then have C++ open it up. all i really need to know is the code required to open the program (the programs intended to …

Member Avatar for Salem
0
176
Member Avatar for amit chaudhary

hi, can any one help me ,i want to access pc serial port through c++ or vc++ built in classes

Member Avatar for Salem
0
111
Member Avatar for scapu

Please i am not getting flow and i am new to C++. Can any body help in this program. C++ program to convert an octal number to decimal and from decimal back to octal. [code=cplusplus] #include <iostream> #include <math.h> using namespace std; void octtodec(); void dectooct(); int main() { void …

Member Avatar for William Hemsworth
0
102
Member Avatar for Jboy05

How do I write a C++ function void ShiftRight (int A[], int m, int n) to shift all elements in the array A to the right m places. Array A has n elements. For instance, if ARY array has {1,2,3,4,5}, calling ShiftRight(ARY, 2, 5) will change the contents of ARY …

Member Avatar for Nick Evan
0
229
Member Avatar for savinki

I want to convert a character to hexadecimal value. and that value should be a unsigned char value. e.g. unsigned char a[16] = {0x00,0x44,...}; this is the code segment i wrote. but its not working properly. unsigned char a1= 'D'; unsigned char a[4] ; unsigned char temp[16]; sprintf((char *)a,"0x%02X",a1); cout<<a; …

Member Avatar for Narue
0
88
Member Avatar for ok555

hi, i need help.. i have been working for about 4 hours trying to figure this out and im still lost.. the answer is probably simple but im new to c++ so please forgive me. off a site called informit, the following code is posted: [code] #define NELEMS(A) (sizeof(A) / …

Member Avatar for ok555
0
183
Member Avatar for mussa187

The command line parameters will consist of a DNS command and then a number of IP-URI string pairs, the dns command is always a single letter followed by a search string. A string pairs is always ip address then uri which must be placed in the dns store. these are …

Member Avatar for mussa187
0
140
Member Avatar for mussa187

The command line parameters will consist of a DNS command and then a number of IP-URI string pairs. The DNS command is always a single letter followed by a search string. A string pairs is always IP address then URI which must be placed in the DNS store. The example …

Member Avatar for mussa187
0
129
Member Avatar for khangwelo

i'm having a problem with my assignment. here is question!!!!!!!!!!!! The company ABC is developing different puzzles for their customers, and need to make the puzzles as complex as possible, but for a start it wants to test their smaller type of application. You are required to develop an application …

Member Avatar for iamthwee
0
87
Member Avatar for bojanski

Hello everyone. First, i'd like to introduce myself, would be very rude to just jump in here :) I'm Bojan, student, 1. year, Croatia, and in this semester i've got a class "Programming 1". Here we're doing C++ (in Visual C++). And the idea of the class is to make …

Member Avatar for bojanski
0
128
Member Avatar for jdphenix

Hello. I'm a C++ newbie and am trying to make a functional console RPG game as a hobby project. The code I'm having a problem with allows the players to move through rooms, similar to an old text adventure game. I realize it's probably inefficient, but I've only been learning …

Member Avatar for Agni
0
309
Member Avatar for Yellowdog428

OK so most can guess I am a student just now learning programming and starting out with C++. I have tried many compilers and IDE's and have settled on Eclipse for now. I do not want to start a What compiler/IDE do you use, but I am trying to figure …

Member Avatar for Yellowdog428
0
110
Member Avatar for hsma

#include <cstdlib> #include <iostream> #include <fstream> using namespace std; int main(int argc, char *argv[]) { string f, o, i, file_c, file_d; ifstream fin; ofstream fout; f = "in.txt"; o = "out.txt"; cout << "Input filename" << endl; cin >> i; file_c = i + f; file_d = i + o; …

Member Avatar for hsma
0
146
Member Avatar for ankit_the_hawk

I have been trying to concatenate two strings declared in the form of pointers i.e. [CODE] char* chars; [/CODE] But the program crashes... Here is the code: [CODE] char *chars1="ankit"; char *chars2="sameer"; char *temp; int i; for(i=0;i<len;i++) { temp[i] = chars1[i]; } for(int j=0;j<len2;j++) { temp[i] = chars2[j]; i++; } …

Member Avatar for Ancient Dragon
0
103
Member Avatar for Phan

Hey, everyone, I am another student seeking help for a programming class. What I am having trouble with specifically is reading from a file. The program itself involves entering in some store products with information such as: product name, product ID, etc. After everything is entered, the program is supposed …

Member Avatar for vmanes
0
109
Member Avatar for nilesh03

My problem is that i've got an input file which contains information about universities, contains string, integer, floating points types also... Here is the first three lines of the file, how could i for example sort it by institution name?? Each column is separated by the tab character... Please help …

Member Avatar for Ancient Dragon
0
109
Member Avatar for M1A1

fatal error C1083: Cannot open include file: 'winsock2.h': No such file or directory I'm using Visual C++ 2005 with MSDN. Can anyone help me figure out the problem? [code] Build Log Build started: Project: Login Server, Configuration: Debug|Win32 Command Lines Creating temporary file "c:\Documents and Settings\Matt\Desktop\eROSE2\Login Server\Debug\RSP00000160004664.rsp" with contents [ …

Member Avatar for Darkkal
0
256
Member Avatar for gazoo

I have this little program that assign seat for ailine passenger, it's work, but I want to add so that it display the name of (passenger = seat number) so far I only got it to display the passenger name in the spot of that seat number. I try set_num …

Member Avatar for gazoo
0
222
Member Avatar for Nimz

hi every1 i also need help with my assignment im supposed to find the errors and explain how to correct it heres the program: //question 3a [code=cplusplus] #include <iostream> using namespace std; int main ( ) { int nrLuggagepieces; float mass, total mass; int averageMass; // initialize totalMass = 0; …

Member Avatar for joshmo
0
104
Member Avatar for jimJohnson

I am working on a program with function files and I am not sure how to ask this so this might be kind of interesting. We were given an input file that I saved to my desktop. This is all I did with it and I am not sure if …

Member Avatar for jimJohnson
0
146
Member Avatar for flash121

Hello, Lets say i have an edit control in my program. When i run the program i can write some text in it. How can i save/convert the text that was written in the control to a CString variable ?(it should be "saved" by clicking on a button)

Member Avatar for mitrmkar
0
2K
Member Avatar for Gondt

the title describes the problem. here's how the code looks like: [code]#include <cstdio> class example { public: class node { public: int value; node *left, *right; }; node *root; example (int a) { root=new node; root->value=a; } // HERE'S THE PROBLEM: void function (node *variable=root) { } }; int main() …

Member Avatar for Gondt
0
277

The End.