49,761 Topics
| |
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 … | |
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 … | |
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? | |
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 … | |
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'; … | |
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 … | |
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. | |
#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 | |
write a program to delete a number passing specific position from your array | |
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 … | |
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 … | |
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. … | |
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. | |
I need the way in SDL work with openGL for allow users input String by writing text . | |
how to get mouse coordinates when user click by mouse using opengl ? | |
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 … | |
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 … | |
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. … | |
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 = … | |
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 … | |
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 :) | |
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 - … | |
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; … | |
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. | |
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. | |
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++ … | |
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 … | |
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 … | |
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 … |
The End.