49,761 Topics
| |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
[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 … | |
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! | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
[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; … | |
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, … | |
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 … | |
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' : … | |
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++ … | |
Hello, I have just a simple and basic question. Write a program in c++ to swap 2 numbers without using a third variable. :D | |
hi every one. can some one please tell me steps to make an MFC application in vc2008? showing a blank window. thanx in advance | |
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 … | |
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. | |
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 … | |
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 … | |
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 … | |
anyone can send some programs about graphics. ..?? just wanted to learn more. .. this is my eadd:[I] <<snip>>[/I] | |
i want to create web browser with manually using c++ | |
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 … | |
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 … |
The End.