49,757 Topics

Member Avatar for
Member Avatar for ELBUF

Greetings everyone, So I posted earlier a similar problem which I wrote in python, but now after accomplishing that, I think ill try to write it up in C++. The link to the original question is [URL="http://www.daniweb.com/forums/thread254474.html"]here[/URL]. If there are any other questions or if you need any more information …

Member Avatar for fadrior
0
656
Member Avatar for swolll

Until now, I've coded in Notepad++ and compiled/tested in my university Unix account. This is getting tedious and inefficient, though. So, what can I do about it? Notepad++ doesn't have a compiler or debugger. I was thinking about using Eclipse. Would that be a good, free option? Does it have …

Member Avatar for Salem
0
258
Member Avatar for moods125

[code]#include <iostream> using namespace std; //function protoytypes int roman2integer(); bool isValidRoman(string & r); int findIt(char ch); int main() { int choice; do{ switch(choice) { case 1: roman2integer(); break; case 2: //integer2roman(); break; case 3: //quit=true; break; default: return 0; }; }while( ); return 0; } /////////////////////////////////////////////////////////////////////////////// int roman2integer() { string …

Member Avatar for Salem
0
774
Member Avatar for SnipeTechie

Hi guys! I was wondering if anyone could provide me with useful tips or answers to the question stated below: Why is the programming language C++ is often used as the main programming language for Biometric Applications compared to Java the programming language? Your help would be really appriciated!

Member Avatar for love angel
1
291
Member Avatar for vidit_X

Practise problem by ~s.o.s~ Q. Write a program which performs addition, subtraction, multiplication of matrices. The dimensions of both the matrices would be specified by the user (dynamic memory allocation required). Use of structure or a class to define the matrix would be a good idea. (Expert) [CODE]#include<iostream> using namespace …

Member Avatar for vidit_X
0
260
Member Avatar for Anarionist

ok i think ive got this right i but i tried compiling an it spit out [QUOTE]error: expected primary-expression before ‘.’ token|[/QUOTE] any idea what this "primary expression is? ive tried single quotes and double quotes to fix it as i have this problem every time i mess with strings …

Member Avatar for Anarionist
0
262
Member Avatar for cpu-guy

Hi guys, Do anyone knows how we can implement this code: Write an efficient recursive function called IndexEqual(A,i,j) that returns true if there exists an index x (i < x < j) such that A[x] = x, otherwise returns false. You may assume A is a sorted integer array in …

Member Avatar for cpu-guy
0
136
Member Avatar for NickRx

I'm new to C++. I want to know if there's any way to shorten this code. [code] #include <iostream> using namespace std; int a, b, result; int main () //Addition (main function of this program) { cout << "Lets add numers\nEnter you first number\n"; cin >> a; //First value cin.clear …

Member Avatar for Narue
0
157
Member Avatar for NathanOliver

Hey all. I have written a quine and I was wondering if I have the jist of it right. I'm not sure if the code needs to be longer or this would be a suitable answer. Here is what I have. btw driver.cpp is the file name for my source …

Member Avatar for NathanOliver
0
146
Member Avatar for enderes05

[CODE]#include<iostream.h> #include<conio.h> void add(){ clrscr(); int a,b,c; cout<<"Enter number:"<<endl; cin>>a; cout<<"Enter number:"<<endl; cin>>b; c=a+b; cout<<"The total is: "<<c<<endl; getch(); clrscr(); } void sub(){ clrscr(); int a,b,c; cout<<"Enter number:"<<endl; cin>>a; cout<<"Enter number:"<<endl; cin>>b; c=a-b; cout<<"The total is: "<<c<<endl; getch(); clrscr(); } void mul(){ clrscr(); int a,b,c; cout<<"Enter number:"<<endl; cin>>a; cout<<"Enter number:"<<endl; …

Member Avatar for lsandling
-1
238
Member Avatar for bobbuilder67

Hello everybody, For a project my dad has enlisted me in, I am to be able to communicate with a Vitamin Scanner from a computer. To illustrate, he opened 'Hyper Terminal' (should come with most Windows computers). He set up a communication using the program, and told me the baudrate, …

Member Avatar for bobbuilder67
0
438
Member Avatar for Roger_Hades

Hey guys! I was wondering if anybody could help me out with my C++ programming. I'm currently trying to sort out a vector of class objects by their member variable but i dont know what i'm doing wrong or missing. I googled alot of things and read through alot of …

Member Avatar for Fbody
0
12K
Member Avatar for juggalo

Ok well first I'll tell you the 3 errors that I am getting... All 3 errors are near the bottom of the code [LIST] [*]main.cpp(103) : error C2664: 'errno_t strcat_s(char *,rsize_t,const char *)' : cannot convert parameter 3 from 'char' to 'const char *' [*]main.cpp(105) : error C2664: 'SzToLPCTSTR' : …

Member Avatar for Ancient Dragon
0
156
Member Avatar for rwill357

My assignment was to write code to Delete an ith node on a linked list. Will this function accomplish that? [CODE]void deleteIthNode(int el){ IntSLLNode *tmp; tmp = (IntSLLNode*)malloc(sizeof(IntSLLNode)); tmp = head; IntSLLNode *oldTmp; oldTmp = (IntSLLNode*)malloc(sizeof(IntSLLNode)); oldTmp = tmp; for( int i = 1 ; i < i-1 ; i++ …

Member Avatar for Lerner
0
392
Member Avatar for jodysmith

Hello, I have just a simple and basic question. Write a program in c++ to swap 2 numbers without using a third variable. :D

Member Avatar for Salem
-6
468
Member Avatar for adnan.siddique

hi every one. can some one please tell me steps to make an MFC application in vc2008? showing a blank window. thanx in advance

Member Avatar for Ancient Dragon
0
151
Member Avatar for 013..

this is my homework.....this is all new to me, i really need help, im reading the book but is confusing, any link to a tutorial would be good to give me an idea on what i need to do please!!! ..... In this assignment, you will write a program called …

Member Avatar for 013..
0
90
Member Avatar for mosespascal

Hi to everyone.Please can someone assist me on how to create internet/web search engine using c++ step by step including the flow chart.

Member Avatar for Ancient Dragon
-1
61
Member Avatar for wilsonz91

Hi, I have a problem here with the c++ if statement. if (adult=1) { hotel=(adult*hotel)+(children*0.5*hotel) +(baby*0); break; } else if (adult=2) { hotel=(adult*260*0.85) +(children*0.5*260) +(baby*0); break; } else if (adult>2) { hotel=(adult*hotel*0.8) +(children*0.5*hotel) +(baby*0); break; the above is a small part of the code i'm doing. Problem here is, It …

Member Avatar for wilsonz91
0
116
Member Avatar for nuB

hey im now starting prog in c++ n im being honest- im REALLY flustered i have to create a program to get information from a user, put the info to a file, create another program to read from that file, calculate total scores of x amount of students n grade …

Member Avatar for nuB
0
116
Member Avatar for ppotter3

Hello! How is everyone? I have been working on this for about a week and a half, and I need it to function properly. I am going to be using this program to build my next assignment, thus needing it to work properly. My problem: I am trying to write …

Member Avatar for ppotter3
0
199
Member Avatar for chieny

anyone can send some programs about graphics. ..?? just wanted to learn more. .. this is my eadd:[I] <<snip>>[/I]

Member Avatar for Narue
-2
55
Member Avatar for raknashivar
Member Avatar for Stefano112

Hi, i'm making a matrix class, here is my code: [CODE]#ifndef MATRICE_H #define MATRICE_H #include <iostream> template <class T> class matrice { public: typedef int sizet; typedef T valuet; matrice(): _data(0), _row(0), _col(0) {}; //costruttore default matrice(sizet rw, sizet cl) { //causa errore in valgrind _data=new valuet*[rw]; for(sizet i=0;i<rw;i++) _data[i]=new …

0
63
Member Avatar for Nakeo

Here is my code [CODE]#include <iostream> using namespace std; int searchList(int [], int, int); int main() { int numItems = 18; int position; int accountnumber; int accounts[numItems] = {5658845, 4520125, 7895122,8777541, 8451277, 1302850,8080152, 4562555, 5552012, 5050552, 7825877, 1250255,1005231, 6545231, 3852085,7576651, 7881200, 4581002 }; cout << "Please enter an account charge …

Member Avatar for Nick Evan
0
162
Member Avatar for hanimzainal

I've homework to complete. but unable to finished due to I'm did not have the idea on how to read from a txt file and write back on it. what I've complete is just entering data via cout and cin. i know that i need to use the fstream and …

Member Avatar for Nick Evan
0
148
Member Avatar for termatt56

I've just read chapter 8 of accelerated C++, which covers template functions. From my understanding if you use a template in a function that function must be included in the header file, as opposed to a source file. Am I correct in thinking this or am I missing something obvious?

Member Avatar for termatt56
0
107
Member Avatar for ELBUF

I am writing my program for the bullseye dartboard question I posted in another thread. The link is [URL="http://www.daniweb.com/forums/thread255853.html"]here[/URL]. Anyways once I debug, it brings up 2 errors that read: LNK2019 Error: unresolved external symbol _main referenced in function _tmainCRTStartup and the file is MSVCRTD.lib and the other error is: …

Member Avatar for ELBUF
0
234
Member Avatar for Skeen

So I'm working on this class, which is basically to wrap a char into 8bools, and it works so far, however I'm running into a problem, in the dedication of values, since I'm to use the overloaded array operator, as well as the overloaded assignment operator, at once, however I …

Member Avatar for dusktreader
0
129
Member Avatar for richman0829

Restarting C++ class after lengthy break, seems I've forgotten a lot. I can't seem to get a cout to indicate that a file record has been read. I created a text file of just one record to keep it simple: an SS number, first and last names, and five exam …

Member Avatar for richman0829
0
239

The End.