49,761 Topics

Member Avatar for
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
363
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
90
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
120
Member Avatar for paruse
Member Avatar for thines01
0
205
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
157
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
180
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
104
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
135
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
135
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
133
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
122
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
165
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
803
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
164
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
716
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
117
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
146
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
66
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
74
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
64
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
108
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
77
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
115
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
118

The End.