48,986 Topics

Member Avatar for
Member Avatar for mmasny

Hello everybody, I'm new here. I'm new to C++ as well and have many problems that you might find silly. One of them is this code, not willing to compile: [code=C++] #include<iostream> class Okno; class ListaOkienEl; class ListaOkien{ ListaOkienEl* pocz; public: ListaOkien(); ~ListaOkien(); void DodajPocz(ListaOkienEl&); void UsunPocz(); ListaOkienEl* WezPocz(); }; …

Member Avatar for mitrmkar
0
100
Member Avatar for atticusr5

Hello everyone, I am a college student in his second year of learning C++. Last semester we would use Visual Studio to write and compile our code in. This year we use linux, more specifically the Vi editor. We use linux in two ways, either we use Putty in Windows …

Member Avatar for Salem
0
138
Member Avatar for Mallos31

Alright, I have a file opened, read into a buffer, and closed. I need to search the file for this string of bytes: FDXXXXXX06YYYYYY The FD is an assembly code to load something, but that's not important here. The XXXXXX and YYYYYY are values that are unknown and YYYYYY will …

Member Avatar for Mallos31
0
182
Member Avatar for ameerkw
Member Avatar for Ancient Dragon
-4
25
Member Avatar for wwsoft

hello can I keep track of objects in a list and being able to sort them by there z var ? do I use pointers ? how would I do this ? [code] #include <vector> vector<sometype> _objects_; create_object(object_type) { new object_type myobject; _objects_.push_back(myobject); return _objects_.at(list_end); } remove_object(int pos) { delete …

Member Avatar for wwsoft
0
103
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
167
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
161
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
145
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
119
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
69
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
654
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
207
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
770
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
253
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
127
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
151
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
145
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
237
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
437
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
467
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
89
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
113

The End.