49,761 Topics

Member Avatar for
Member Avatar for macman101

Hey, I need some help inserting into a function and sorting the 10 user input numbers, I'm close, but I get zeros every time. Here is my code: [CODE]#include <iostream.h> void InsertIntoArray (int[], int, int, int); int whichSlot (int[], int, int); int main() { int num; int times; const int …

Member Avatar for ChaseVoid
0
177
Member Avatar for wilsonz91

Hi, My friend have a problem with running c++. She's using windows vista home basic. She's able to install C++ and run it but when she tries to launch any program she wrote, it pops out saying that it has a compatibility issue with this version of windows. Any ideas …

Member Avatar for Ancient Dragon
0
163
Member Avatar for rookanga

I am very new at this and I tried to look it up on google and that didn't help so I was wondering (and I know that you have to use shapes, to use a flow chart) how do you make a flow chart. to be more spefic the shapes …

Member Avatar for wilsonz91
0
147
Member Avatar for Emerald09

Hello! I have written the code for a function that takes an object DailySale and compares its values with an array of objects fromInventory. If the id of the DailySale object matches with the id of an object in the array, it takes the price from there and calculates the …

Member Avatar for jonsca
0
120
Member Avatar for gayatridevi

hi, I V.Gayatri Devi I am writing the c code in linux for distance calculation using haversine formula I included in my program as #include <math.h> but the sine functions and squareroot functions are not working in my program. instead of using math.h i also used cmath.h but there is …

Member Avatar for jBat
0
70
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
657
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
286
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
776
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
294
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
262
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
138
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
64
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

The End.