49,761 Topics

Member Avatar for
Member Avatar for learncoding

I have a vector which contains class objects of classObjects vector<classObjects> classObjectVector; I am trying to use std::find to search for a record in my vector, but I get an error message error Invalid operands to binary expression due to this line. if (std::find(classObjectVector.begin(), classObjectVector.end(), "aElement") != classObjectVector.end()) { //found …

Member Avatar for learncoding
0
2K
Member Avatar for andreas.petrou.967

Write a C++ code which will display the following menu, ------------- Menu ---------- ----------- 1.Read a list of numbers. 2.Display list. 3.Save list to File. 4.Load list from file 5.Search for a given number in the list. 6.Reverse list. 7.Calculate the sum of the list. 8.Calculate the average of the …

Member Avatar for richieking
0
168
Member Avatar for merry gold

i have a project of constructing vompiler using C++ language. but i don't know how to make the lexical,syntax and semantic phasse and how to generate errors. can anyone help me?

Member Avatar for Schol-R-LEA
0
147
Member Avatar for andreas.petrou.967

How to find this average for this programm read 3 grades for students #include <iostream> #include <string> using namespace std; const int arr_size = 30; const int name_size = 20; void f_name_s(char name[name_size][arr_size], int math[arr_size],int history[arr_size],int physics[arr_size],int& num_s); void display_arr(char dstuds[name_size][arr_size], int math[arr_size],int history[arr_size] ,int physics[arr_size], int stud_num); //********************************************************* void …

Member Avatar for andreas.petrou.967
0
148
Member Avatar for haider885

I have same type of errors in my program please help me out.... I am just a Beginner in C++.... #include "iostream" #include <stdio.h> #include <conio.h> #include <stdlib.h> using namespace std; class form { private: char fname[20]; char lname[20]; char add[50]; char city[25]; int contact; public: form() { fname[20]='\0'; lname[20]='\0'; …

Member Avatar for deceptikon
0
221
Member Avatar for andreas.petrou.967

Write a C++ code which will display the following menu, -------- ------------- --- Menu -- ---------- ------- ----------- 1.Read a list of numbers. 2.Display list. 3.Save list to File. 4.Load list from file 5.Search for a given number in the list. 6.Reverse list. 7.Calculate the sum of the list. 8.Calculate …

Member Avatar for andreas.petrou.967
0
204
Member Avatar for sireiz

I want to put a lot of searchable text in my software, What would be the best option for that, A database or file-Handling system? Platform will be Windows and Android.

Member Avatar for Ancient Dragon
0
137
Member Avatar for Denral

#include <iostream> int main () { cout <<"***\n"; return 0; } just an idea ... it is a short code but anyway it doesn't work (i just started c++ and i have dev c++ 4.9.9.2 c) cout isn't working

Member Avatar for blueshiftdani
0
184
Member Avatar for jax prajapati

write a program to delete a number passing specific position from your array

Member Avatar for Vinayak_1
0
138
Member Avatar for Jokatech

Pls can some one help to debug this command interpreter. Can someone help, it complain during compilation. int main(int argc, char *argv[]) { int status; int pid; char *prog_arv[4]; /* Build argument list */ prog_argv[0] = "/usr/local/bin/ls"; prog_argv[1] = "-l"; prog_argv[2] = "/"; prog_argv[3] = NULL; /* * Create a …

Member Avatar for Ancient Dragon
0
196
Member Avatar for johnson_2

firstly I admit I am asking this because of my homework secondly, my c++ is still at a beginner level. so I need some help. ok..going back to my question. I am trying to remove a line containing username and password from text file. so I tried to following, 1)Read …

Member Avatar for johnson_2
0
5K
Member Avatar for dodd7

Hey Cplusplus community. I am a long time reader of these forum threads but this is my first actual post so please tell me if there is anything I should do differently in future. I am posting about a problem I am having with one of my OOP c++ assignments. …

Member Avatar for richieking
0
203
Member Avatar for aroshkhan

a salesman travel from sindth to punjab province. He may visit either n=2,3,4,5 or 6 cities of punjab. For every number of cities n he may adopt different roots. Some roots will be longer and other shorter. Develop a Cpp program.

Member Avatar for Ancient Dragon
0
157
Member Avatar for moudy.mak

I need the way in SDL work with openGL for allow users input String by writing text .

Member Avatar for richieking
0
150
Member Avatar for Adeel Rahat
Member Avatar for richieking
0
131
Member Avatar for moudy.mak
Member Avatar for richieking
0
140
Member Avatar for Jokatech

A program which has the main process as Director process, which reads a file containing marks of all quizzes of all sections and creates x number of Manager processes. Each Manager process will take care of solving for a section. Each manager process will create y number of worker process …

Member Avatar for richieking
0
294
Member Avatar for roidbeginner

I am still at beginner stage in c++ and I am always curious about good/best coding method. let's say I have a program which allows a users to edit the salary of a employee. 1)The system will prompt the user which to key in a employee's name first. 2)The system …

Member Avatar for Dani
0
115
Member Avatar for roidbeginner

I have text file that contains username and password userandPassword.txt chris ABC jane DEF john DEF I am tryng to Decrypt the password using caesar cipher, with a key of 3 from the text file. which means that if I key in username: chris and password:XYZ, it will login successfully. …

Member Avatar for roidbeginner
0
1K
Member Avatar for roidbeginner

I asked this question yesterday http://stackoverflow.com/questions/20908568/calculating-daily-and-monthly-sales-from-text-file and now I have come up with this code: **stock.h** #ifndef stock_stock_h #define stock_stock_h #include <iostream> class stock { public: stock() { itemName = " "; unitPrice = " "; quantityPurchased = " "; day = " "; month = " "; year = …

Member Avatar for roidbeginner
0
309
Member Avatar for tom.scott.73113

Hey I am almost finished my code but i cant see why in the voucher print function its not displaying cost near hire cost anyone else me out ? #include<iostream> #include<iomanip> #include<conio.h> #include<string> #include<windows.h> using namespace std; void Intro(); void NameValidation(string name); bool LicenseValid(string license); bool CreditCardValidation(string creditcard); bool AgeValidation(string …

Member Avatar for tom.scott.73113
0
195
Member Avatar for naji.awad1

Hey guys :) Can anyone show me a tutorial for game development in C++. Btw I'm on a mac so I can't go to the DirectX tutorial. Can you please avoid www.cprogramming.com because I dont like it. Thanx anyways :)

Member Avatar for Ancient Dragon
0
225
Member Avatar for mixelplik

I want to pass an input file to a function and within the function, fill an array by reference. It isn't allowing me to do this, it keeps telling me it's expecting a ";" after i in the function. I couldn't really find anything about this in my book - …

Member Avatar for mixelplik
0
263
Member Avatar for jursnamo

i have program C++ but i will convert to C How to convert C++ to C? #include <iostream.h> #include <conio.h> struct mahasiswa { int nbi; char nama[50]; char alamat[50]; int telp; }; void main() { int pilihan,pilihan1,T; menu: mahasiswa data[3]; cout<<"Pilih Menu :"<<endl; cout<<"1.Input Biodata"<<endl; cout<<"2.Tampilakn Semua Data"<<endl; cout<<"3.Cari Biodata"<<endl; …

Member Avatar for Ancient Dragon
0
246
Member Avatar for Maria Clara

Hi! Does anyone know how to connect or link Scilab libraries to Code::Blocks? I keep on searching the internet but I cannot find a step-by-step tutorial on how to do it. I also tried so many methods already but it still won't work. Thank you.

Member Avatar for Ancient Dragon
0
82
Member Avatar for cam875

can you call a function inside that same function so that it goes to the beginning of that code to execute it. So even though ur already in the prompt function can u still call it again from withing the code inside the prompt function. Thanks in advance.

Member Avatar for akshaykeerthi.srikanth
0
284
Member Avatar for Arm55

Hello everybody, I'm new in this forum. I don't know where to place this thread, because it's about VB6 and C, but I think the problem is in the C code so here I am. I'm working with C with no special focus, so the solution can be in C++ …

Member Avatar for Arm55
0
736
Member Avatar for richieking

This is a basic CPP sleep fuction. As you can see CPP libs do not come with a time sleep/wait fuction to use in your code/loop. So due to boring jurney to Saint Petersburg, i decided to write something/code to give anyone who has been wondering why CPP does not …

Member Avatar for deceptikon
0
2K
Member Avatar for triumphost

Creating WinAPI windows and controls can be a pain and quite difficult/annoying at times. Most of the time, I find myself searching MSDN, DaniWeb, and StackOverflow. I hate having to use external libraries unless I absolutely have no other choice. Below contains code for creating WinAPI windows, Controls, Sub-Classing, and …

Member Avatar for mike_2000_17
0
4K
Member Avatar for christinetom

Trying to compile an Fast Light Tool Kit project for the first time. This is one I've generated in FLUID and dragged into Code::Blocks IDE (MinGW compiler). Not sure what this error means or how to fix it but it seems that it's very common? Any clues as to what …

Member Avatar for Ancient Dragon
0
18K

The End.