51,593 Topics

Member Avatar for
Member Avatar for Icebone1000

First..Im very beginner with winsock and network programing.. Im doing a simple app that can act or as server or as client. What Im doing is that I open the app twice in the same computer, in one I choose server, and in the other client. With the server part, …

Member Avatar for lashatt2
0
845
Member Avatar for hla3mi

[CODE]#include <iostream> #include <string> using namespace std; struct Employee { //Data string name; int id; string residance; int salary; }; class Node { public: // Data Employee data; // The Next Pointer Node * next; // Constructor Node(Employee Object ,Node * ptr = NULL ); }; class List { int …

Member Avatar for hla3mi
0
199
Member Avatar for anurag814

i want to know the programming code which converts roman numerals to integer numerals.

Member Avatar for VernonDozier
0
47
Member Avatar for Wong23

I am given the class definition of stack and queue classes where I have to write a templated function called reverseQueue(?) that takes a pointer to queue as a parameter and uses stack object to reverse the given queue. The function call to reverseQueue should reverse the data of the …

2
229
Member Avatar for number87

hi I wanna find out the number of integers from an input number. For example if i enter 84075, the output should be 5. this is what i came up with.....im new to c++ still>.< [code=cpp]#include <iostream> using namespace std; int main() { int numCount, number; bool integer; cout << …

Member Avatar for taepodong1101
0
203
Member Avatar for mevkurray

hi all using ubuntu here, and the default setup (straight from synaptic) of wxwidgets has the wxDB classes disabled. so, how does one rebuild the actual libraries of wxwigets, once ive edited the setup.h files. and which setup.h files do i need to edit. i found what i was looking …

Member Avatar for mevkurray
0
192
Member Avatar for thelamb

Hello all, I have a VB.net application and a C++ DLL. The C++ DLL has an exported function that gets called by the VB.net application. The C++ exported function is as following: [CODE=cpp] STARTUPINFO si; PROCESS_INFORMATION pi; ZeroMemory( &si, sizeof(si) ); si.cb = sizeof(si); ZeroMemory( &pi, sizeof(pi) ); TR::Log( "Starting …

Member Avatar for thelamb
0
2K
Member Avatar for red999

So I am creating a program for a class that reads in from a file the appointments. The file has this format Date,Subject,Start Time,End Time,Location,, The interesting thing about the file is that it does not contain the same appointment (same name, location, and time) more than once. For example: …

Member Avatar for red999
1
100
Member Avatar for jonathanYoung

hello; i've been programming with c++ for about 2 months, BRAND new at this, im currently making a text based RPG for one of my programming classes. im having trouble with a error that comes up, and no one in my class can find out what exactly is the problem... …

Member Avatar for jonathanYoung
0
109
Member Avatar for Ashishinani1756

Print all the pairs of prime numbers which is equal to the sum of the given no. entered by user.

Member Avatar for donaldw
0
94
Member Avatar for Lukezzz

I am looking for a way to find the first occurence of: " " when searching backwards in String1 with beginning at index where # was found. However with LastIndexOf, this will find the Last occurence of " ". How can I find the first occurence of " " wich …

Member Avatar for thines01
0
122
Member Avatar for wyett

So, I'm working on a fraction calculator to add, subtract, divide and multiply. Currently on the part where it's asking for the user to input their fractions. My professor states this on the assignment sheet: "A valid sign will be ‘+’ or '-', a valid whole part or numerator will …

Member Avatar for jonsca
0
90
Member Avatar for combustion

Hello, I'm new to c++ and I am trying to convert a bruteforce program from Python to c++. Here is what I have so far: [CODE=c++] #include <iostream> #include <string> using namespace std; char chars[]={'0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'}; string t; cout << "Enter a string: " << endl; cin >> t; void checkPassword(string …

Member Avatar for Ancient Dragon
0
260
Member Avatar for hmpargi

/* What: Instant Insanity Game source in Turbo C. GPL(C) ======================= Col1 Col4*4 3 3 3 3 Row1 405 405 405 405 Row2 1 1 1 1 Row3 2 2 2 2 Row4 ======================= c:\mosh\games>tcc -If:\tcc30\include -Lf:\tcc30\lib instanti.cpp */ #include "cubeinit.cpp" int cube[4][6]; /* four cubes with six faces */ …

-2
71
Member Avatar for whouton

Hi guys, I'm trying to make a function that allows the user to enter in a file name and access that file; if the file name is wrong or the file is not there, I want to allow the user to enter in another file name. For some reason the …

0
78
Member Avatar for Philly0494

Okay, so I have to execute a batch command on a restricted user's account, however the batch command will not work unless the process has Administrative Privileges. currently i call the batch command via [CODE]system("command here");[/CODE] I, as the programmer, know the Administrator user/password on the WinXP machine this is …

Member Avatar for Ancient Dragon
1
109
Member Avatar for Fujy

I`ve been programming in Java, and started learning C++ a few days ago. I was playing around with codes and got this : [CODE] # include <iostream> using namespace std; int main(){ char str[100]; char *pnt[100]; for(int x = 0; x <= 100; x++){ pnt[x] = str[x]; } read(); } …

Member Avatar for thines01
0
365
Member Avatar for fiaz ranjha

class Account { protected: char* Account_Holder; int Amount; public: Account(); Account( char* Holder, int Num ); Account( Account &obj ); }; Account::Account() { Account_Holder = NULL; Amount = 0; } Account::Account( char* Holder, int Num ) { Account_Holder = Holder; Amount = Num; } Account::Account( Account &obj ) { Account_Holder …

Member Avatar for thines01
0
91
Member Avatar for BeyondTheEye

[I]Assignment:[/I] Write a function zet_om_naar_getal(getal) that calculates the binary representation from a decimal number as a string, using recursion. [I]What I have so far:[/I] [CODE=CPLUSPLUS]string zet_om_naar_binair(double getal) { string binair; if(getal >= 1) { binair += '0' + static_cast<int>(getal)%2; binair += zet_om_naar_binair(getal/2); } else if(getal > 0) { double dubbel …

Member Avatar for thines01
0
120
Member Avatar for Ragoune

Hi, As I'm new to C++, but not to programming, I tried to start simple by reading off value from the registry. I'm talking about standard values such as the processor's name. I made a little function which checked how many processors the user has, that works fine. But I …

Member Avatar for Ragoune
0
3K
Member Avatar for kernel>panic

Hi, I have been trying to figure this out: How do you remove more than one thing like this remove("C:/Users/"+name+"/Documents/help"); How I want it to work is the users specify's there user name and then it opens the C drive>Users>Then it needs to add the input user name. Thanks.

Member Avatar for thines01
0
122
Member Avatar for paruse
Member Avatar for thines01
0
208
Member Avatar for Carrots

Hi, I have wrote a program which stores values in a .csv file. He is the how the data is stored in the .csv file: [quote] "Steve","21 Main Street, Nottingham","SW1 1AB","0115 9123456","These are some details. and, so.","112233","1359" "David Baner","123 Shaw street, Nottingham","NG92HJ","020 123456","ifbiugbuige","112233","1200" [/quote] Each line forms a single object. …

Member Avatar for Ancient Dragon
0
165
Member Avatar for basketball4567

Hey guys, Im creating a weighted minimal spanning tree and using breadth first search among other things. My question is that in the breadth first search, there needs to be a way to look at nodes that are already connected to see if it creates a cycle. This wouldn't be …

0
79
Member Avatar for greenerworld007

Hi, I hav heard that it isn't that simple to write a program in linux using c. Lots of commands n stuff.Please simplify what actually I've got to do to run turbo c++ in my linux laptop as I am a beginner.

Member Avatar for necrolin
0
184
Member Avatar for ge6a93

Hello, i'm using Visual C++ 6.0 with MFC. I'm making a dialog based application and i'm using OnTimer() function. But when i start my program my application screen is blinking because of the Timer. It is a little annoying and i need your help to make it not to blink. …

Member Avatar for Ancient Dragon
0
106
Member Avatar for MattyRobot

would there be anything wrong with making an includes.h which has all of the .h files my project needs to link to. or is it better to link to them when needed?

Member Avatar for MattyRobot
0
138
Member Avatar for PDB1982

I need to complete a simple program that takes an input file with the following information: Johnson 85 83 77 91 76 Aniston 80 90 95 93 48 Cooper 78 81 11 90 73 Gupta 92 83 30 69 87 Blair 23 45 96 38 59 Clark 60 85 45 …

Member Avatar for pecet
0
136
Member Avatar for LennieKuah

[B]Hullo there,[/B] [B]C#Net 2003 Window Application [/B] I need your help again. I am trying to loop through the DataGrid rows and confirm that FirstColumn which hold Checkbox is TRUE. If it's TRUE, I need to retrieve the Customer FirstName(2nd Column) and LastName (3rd Column) and transfer the data onto …

Member Avatar for Geekitygeek
-1
308
Member Avatar for T-Dogg3030

I'm trying to open a txt file using command line arguments in Visual C++. I know you need argc and argv[] in the main. What would be an example you would type into the text field on project>properties>debugging>command arguments? How would you display the text on screen? After reading the …

Member Avatar for Nick Evan
0
17K
Member Avatar for William Byrd II

[November] 13. Greetings and salutations! I am currently experiencing some trouble with some novice coding, and some assistance would be greatly appreciated. My goal is to access the static data member and static function of friend class Counter without actually creating a Counter object. I am under the impression that …

Member Avatar for dkalita
0
135
Member Avatar for bpt0004

Hi everyone, I'm having problems on my current project. The project consists of optimizing a given function using either the Hill Climber or Genetic Algorithm. The functions I'm going to be optimizing are the Schwefel, Rosenbrock, and Griewangk problems defined here [URL="http://www.cs.cmu.edu/afs/cs/project/jair/pub/volume24/ortizboyer05a-html/node6.html"]http://www.cs.cmu.edu/afs/cs/project/jair/pub/volume24/ortizboyer05a-html/node6.html[/URL] My code for each of the three function …

Member Avatar for StuXYZ
0
1K
Member Avatar for Freezeskier

Ok so i have to write code to construct matrices and vectors then compute some linear algebra problems like the dot product and so on. so I have written the code to construct the matrix and the vectors and so the functions, it works and does class operations however what …

Member Avatar for Freezeskier
0
127
Member Avatar for fopah

i need the user to input a todolist type thing it uses strings to save the items. what i need to know is how to have the user input a string with the getline function any help would be much appreciated

Member Avatar for arshaad
0
169
Member Avatar for EngneerNitemare

Hey guys I have a couple of questions. I am trying to build a program that will prompt for the user to enter the size of an array. I've searched the web and several C++ books for guidance on this but have not been able to find anything of significant …

Member Avatar for mrnutty
0
20K
Member Avatar for NinjaLink

Hello, I need help reversing elements in a queue using Recursion. My problem is that when I print out the reverse, it does not show the numbers on the screen. However my program compiles and runs. My question is...How come the numbers in reverse are not showing? Thanks for anyone …

Member Avatar for NinjaLink
0
804
Member Avatar for EngneerNitemare

Hey all! I am trying to write a program that allows for: 1.) The user to enter the SIZE of an array. 2.) Prints random element numbers. 3.) Saves the random element numbers printed in the array. 4.) Bubble sorts and then prints the randomly printed numbers. Here is what …

Member Avatar for mrnutty
0
170
Member Avatar for fragtech

I cant figure out why this message is popping up. This is a program that is calculates if it is a leap year. [CODE]#include <iostream> using namespace std; int main() { double year, mod4, mod100, mod400; bool leapYear; cout << "Enter a year from 1582 on.\n"; cin >> year; /* …

Member Avatar for fragtech
0
720
Member Avatar for StaticX

Hi,im having trouble with fstreams at the moment,here is my code [CODE]// read contents of file using fstream // using the ->get() function. // Ascii files only. #include <iostream> #include <fstream> using namespace std; main(){ fstream* file = new fstream( "myfile.txt", fstream::in); char aSingleCharacter; //this will read a single char …

Member Avatar for Ancient Dragon
0
121
Member Avatar for kele1

i don't know what i'm doing wrong in this program. i'm supposed to write a program that would encrypt and decrypts four-digit integers.it should encrypt it as follow: replace each digit by the remainder after the sum of that digit plus 7 is divided by 10. then swap the first …

Member Avatar for kele1
0
147
Member Avatar for rajni033

hi!! i need to create a flow chart in a window using MFC . i m having problems in finding coordiantes of mid point of my window when i maximize or minmize my window, n dats why many of my symbols ( eg. rectangles,rhombus vanish when my window is minimized …

Member Avatar for kvprajapati
0
67
Member Avatar for Phil++

Hey there, I'm wondering if it is possible to read a PHP file (on the web) through C++? For example, I have a system that allows people to enter some information online (stored in a database) I then want that to be displayed through a console application. Is this thing …

Member Avatar for Phil++
0
78
Member Avatar for Lukezzz

I am trying to do a string out of this line: Hello "Hello" Hello However this does not work and I beleive it has to do with "Hello". [code] String^ str = "Hello "Hello" Hello"; [/code]

Member Avatar for thines01
0
66
Member Avatar for Trekker182

If a constructor calls another class with another constructor and both constructors have methods that access the same class, which would be first? First constructor in a method separate from the class [CODE]{ Entry entry(" ", " ", " ", time.Hours(), time.Minutes()); return !(list.IsPresent(entry)); } [/CODE] Second constructor that it's …

Member Avatar for Trekker182
0
111
Member Avatar for Ryujin89

I have, with the vast assistance of Bazzy on cplusplus as well as a few other programmers, made the code to input a file into a vector. Even after looking over the tutorials on algorithms, I still can't figure out how to sort the data. It's due in [U]4 hours …

0
79
Member Avatar for GSEninja

Hello all, i am looking for a little help but PLEASE do not solve the problem for me, i need to learn the stuff. Below are a list of problems i am having, followed by my code and then the output i currently have my problems: 1) the style in …

Member Avatar for mrnutty
0
117
Member Avatar for NinjaLink

I need help with my print function, so I can print the elements in a queue. The print function, that I have now is the last function in my header file. I tried to do a small simple program to see if it works, but it prints nothing to the …

Member Avatar for NinjaLink
0
120
Member Avatar for samsons17

i tried to do something like this in one of the program i made.... if the user entered something that is not the same with the number and the word that are available in the program,it will ask the user to enter the input again.. But the problem is that …

Member Avatar for Ancient Dragon
0
117
Member Avatar for jennwenn25

Hello, I am very new to all of this and I need a little help. I am supposed to create a simple calculator and here is what I have: [CODE]/* Specification: This program is a simple calculator */ #include "stdafx.h" #include <iostream> using namespace std; namespace calculation{ enum menuOptions {Add, …

Member Avatar for jennwenn25
0
141
Member Avatar for leinadbg

Hello, i am searching for way, to open web page with C++ and after that to control its elements. I know that i can do this in Delphi, with WebBrowser.OleObject.Document and TWebBrowser. Do you know similar way that i can use in C++?

Member Avatar for marco93
0
179

The End.