49,761 Topics

Member Avatar for
Member Avatar for JoBe

Hello ladies and gents, Wanted to ask if someone could help me out with the debug settings in VC++ 2005. What I want to be able to do is to follow my program step by step and see what happens with the variables. I know it's related to the settings …

Member Avatar for Ancient Dragon
0
280
Member Avatar for linq

string strd1 = "9"; int m=atoi(strd); Got the error: error C2664: 'atoi' : cannot convert parameter 1 from 'class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >' to 'const char *' how to change the second line to make it work?

Member Avatar for Salem
0
130
Member Avatar for kamleshpdude

Hi, I want to write a program in perl which will pass function parameters to a C++ .exe file and run the exe file with these parameters

Member Avatar for MattEvans
0
92
Member Avatar for JRM

Hello, I've put up some posts about the programming tools that I am currently using. So far, no takers. This makes me wonder what people who know what they're doing are using! M$'s IDE seemed overly complex for my modest needs. Besides, I have no use for the DLL and …

Member Avatar for nanodano
0
144
Member Avatar for linq

how to solve this error: error C2664: 'strcpy' : cannot convert parameter 1 from 'class CString' to 'char *' when I am using strcpy(StdGrades.StudentName, this->m_StudentName); StdGrades is a struct, StudentName is a CString type, m_StudentName is a CString variable. Actually it is from: [URL]http://www.functionx.com/visualc/fileprocessing/cppserialization.htm[/URL] there is only one error

Member Avatar for Ancient Dragon
0
97
Member Avatar for linq

if I have three words in there lines in a .txt file, and I want to read them to three string, how to do this using c++ ifstream? how to read every line(word)?

Member Avatar for WaltP
0
21K
Member Avatar for sbenware

My recent assignment is to find Mersenne Primes between 2 and 1,000,000. For the first part of my code, I have a function to find out if a number is prime or not. The second part of my program runs a Lucas-Lehmer test to find the Mersenne number. My problems …

Member Avatar for sbenware
0
311
Member Avatar for mattyd

(** This post was inspired by a recent post I read where a reply suggested the indenting of all code.) I am guilty of this, I'll be honest. I know it is important to indent and indent properly, it is industry standard, and it is simply utilitarian. I always think: …

Member Avatar for vegaseat
0
317
Member Avatar for hui

[code]#include <iostream.h> #include <fstream.h> main(int argc, char *argv[]) { //definition of the variables. int mtx1[20][20], mtx2[20][20], mtx3[20][20]; int n, i, j, k; //exit if the number of arguments is not 2. if(argc != 3) { cerr << "Usage: mm <filename1> <filename2>\n"; return 1; } //open the input file 1. exit …

Member Avatar for Salem
0
137
Member Avatar for Senekha

Hello, this is my first post on these forums. I'm taking a CPSC 100 course to supplement the science part of my degree, and I've been having a lot of trouble since the midterm, when the profs for the class switched (they have completely different teaching methods). Since then, I've …

Member Avatar for Senekha
0
588
Member Avatar for JS1988

Quick question, what do i want to put in the while of my do while statement in myprintitle function so that will loop around with the main part as well. [CODE] include<iostream> #include<iomanip> using namespace std; int startDay(int , int ); int calcjan1(int, int ); void printMonth (int , int …

Member Avatar for JS1988
0
127
Member Avatar for xerA

Hi everyone. I'm extremely new to this. It's my first programming course, period. I realize I probably needed a load of pre-reqs, but for some reason, I was advised to take Intro to C++ so... So far, I've been doing well! However, this latest project has me stumped... The jist …

Member Avatar for Ancient Dragon
0
106
Member Avatar for Juggler

I am once again getting confused with functions and arrays in C++. I am trying to write a program that collects three values from a user, then displays those and does various things with them. In short, what's the problem with this line of code right here? [code] player = …

Member Avatar for HelenHui
0
110
Member Avatar for mhasan_mitul

Hi Greeting to all I want to build a USB driver for windows98. But I do not know how to build a device driver in windows. My targeted language is C/C++. So I need help to know how can I build a device driver for windows. As well as I …

Member Avatar for Ancient Dragon
0
104
Member Avatar for mattyd

Greetings: A simple question that has me stuck: Program runs, calls function, function runs... Return to Main? This last area is where it fails. No errors, just no control returned to Main.cpp at end of function run. I've been studying the code much and researching the solution on the Net …

Member Avatar for mattyd
0
152
Member Avatar for JS1988

can anyone tell me how to fix this, it needs to print out the calendar for a whole year. [CODE]#include<iostream> #include<iomanip> int startDay(int year, int calcjan1); int calcjan1(int year); void printMonth (int startDay, int days); int main() { char again; int year=0; do { cout<<"Enter a year for a calendar …

Member Avatar for Nick Evan
0
112
Member Avatar for linq

I am using C++ in VC++ 2003 there are some examples like this [URL]http://www.codeproject.com/cpp/miniexcel.asp[/URL] but I don't quite understand. I hope someone could help me or guide me to some related documents, bow!

0
54
Member Avatar for RichC

I have been trying to store the values of card face value into an array called faceValue but I don't know how to do this. I've created the array and placed in public in my h.file (char faceValue[5];) but trying to link it to *face in the function deal is …

Member Avatar for Ancient Dragon
0
107
Member Avatar for noxee

Hi I'm trying to have an assignment operator for my linked list class so that when I call it, it replaces the current one with the one I pass in. i.e testList1 = testList2; I'm trying to get it so that testList1 will point to testList2. Here is the code …

Member Avatar for noxee
0
75
Member Avatar for FireSBurnsmuP

I had to use an enumerated data type in my last program, and I couldn't get my program to stop giving me fatal run-time errors. here is the enumerated data type: [code]enum piece {EMPTY, BLACK, WHITE};[/code] Now, the trouble I am having is related to evaluation or assignment of this …

Member Avatar for FireSBurnsmuP
0
156
Member Avatar for punter

Hey. The intent of this program is to help answer the question “How good is the random number generator rand()?”. The program must be designed and written in a modular fashion using functions and arrays The function rand() returns int values between 0 and some system-specified maximum value. The first …

Member Avatar for Ancient Dragon
0
221
Member Avatar for linq

I am using the MFC dialog application. There are 3 edit box, add1, add2 and sum and a button "add", when exectuing, I input add1, add2, and use the "add" function dlg.m_sum=dlg.m_add1+dlg.m_add2 how to make the sum appears in the "sum" edit box? Do I have to add a view …

Member Avatar for Ancient Dragon
0
108
Member Avatar for CurtisBridges

Nuts I'll be soon. I still cant get this to run.It keeps telling me cannot convert from const and I cant find where I declared a constant. Help Please! [CODE] #include <iostream> #include <iomanip> #include <conio.h> using namespace std; void call(void (*)); void Menu(char [11][25]); void Add(char [11][25]); void Update(char …

Member Avatar for Ancient Dragon
0
79
Member Avatar for JRM

Helo again. I was experimenting with the use of ctags in Vim. Before I started, I made sure to download the lastest and greatest version of "exuberent ctags. While the Vim manual says to run ctags *.c, i took the liberty to run ctags *.cpp instead (just in case...). The …

0
54
Member Avatar for batista06

Greetings...I'm trying to add a part for 2 times the rate for any hours over the first 60...Can anyone aid me? Many thanks [code] // This program calculates gross pay. #include <iostream> #include <iomanip> // Global constants const double PAY_RATE = 10; // Hourly pay rate const double BASE_HOURS = …

Member Avatar for Ancient Dragon
0
125
Member Avatar for coool_rahul

have prepared a code in c++ to save high scores and it is working well when i compile it in turbo c++and run the code . but when i exit from the turbo c++ , the file to which i saved the high scores get corrupted and so when i …

Member Avatar for Salem
0
755
Member Avatar for jimbobint

I'm really having trouble understanding how to initialize multidimensional arrays. The way it is explained in the book I'm reading is: You assign the list of values to array elements in order, with the last array subscript changing and each of the former ones holding steady. Therefore, if u have …

Member Avatar for ~s.o.s~
0
156
Member Avatar for noxee

I'm having a problem inserting data into my binary search tree, it will insert some of it but not all. this is the header file for my BST class: [code=c++] #ifndef BST_H #define BST_H //----------------------------------------------------------------------------------------- #include <string> #include "LinkedList.h" //----------------------------------------------------------------------------------------- using namespace std; //----------------------------------------------------------------------------------------- class BST { public: //Default constructor, …

Member Avatar for noxee
0
124
Member Avatar for jcflore3

Five sets of 3 double numbers stored in a 5x3 array in C++, How do i do this, I have this so far [COLOR=#0000ff]include[/COLOR][COLOR=#000000] [/COLOR][COLOR=#800000]<iostream> [/COLOR][COLOR=#0000ff]# include[/COLOR][COLOR=#000000] [/COLOR][COLOR=#800000]<iomanip> [/COLOR][COLOR=#0000ff]# include[/COLOR][COLOR=#000000] [/COLOR][COLOR=#800000]<cstring> [/COLOR][COLOR=#0000ff]# include[/COLOR][COLOR=#000000] [/COLOR][COLOR=#800000]<cstdlib> [/COLOR][COLOR=#0000ff]using[/COLOR][COLOR=#000000] [/COLOR][COLOR=#0000ff]namespace[/COLOR][COLOR=#000000] std;[/COLOR] [COLOR=#0000ff]int[/COLOR][COLOR=#000000] main ()[/COLOR] { [COLOR=#0000ff]const[/COLOR] [COLOR=#0000ff]int[/COLOR] NUMROWS = 5; [COLOR=#0000ff]const[/COLOR] [COLOR=#0000ff]int[/COLOR] NUMCOLS = …

Member Avatar for may4life
0
270
Member Avatar for The Leprechaun

ok well i started out with making my own source code then compiling and running with Dev-C++ and when i run it, its working fine until the last line, here let me past my code [code]// just a test #include <iostream> #include <string> using namespace std; int main () { …

Member Avatar for may4life
0
82

The End.