49,755 Topics
![]() | |
Hello, I need to export some functions in my C++ dll to a client that can dynamically load dlls. That all works, but I am not able to stop the name mangling.I have extern "C" __declspec(dllexport) int __stdcall add( int a, int b ); but the dll exports _add@8 - … | |
Hi all.How to make the ball in pixel art,so i could use perfect round ball in my anumation project? Or how to make perfect shapes | |
I'm tring to make a programe which takes the string from user and save in file(data_file). But I also want to take the .txt file from window and read the file and save in my programe file(data_file). user just give the address of .txt file or any other method in … | |
#include <iostream> #include <cmath> using namespace std; int main() { char flag; float emp_no,basic,da ,hra,pf,tax,net_salary,total_salary; cout<<"enter the basic salary & employee no."; cin>>basic>>emp_no; if(basic<=5000) flag=0; else if(basic>5000&&basic<=15000) flag=1; else if(basic>1500 && basic<=25000) flag=2; switch(flag) { case '0': tax=0; da=(25/100)*basic; hra=(20/100)*basic; pf=(5/100)*basic; break; case '1': tax=(10/100)*basic; da=(25/100)*basic; hra=(20/100)*basic; pf=(10/100)*basic; break; case … | |
I have been working on this for awhile, but I was hoping to get input from someone with more experience. I have to stick with the structure and enum format for the assignment, but I was wondering if anyone had any opinions on the way the high/low temperature sections should … | |
Hi im creating a linked list with these data types etc int account_number char firstName[10] char lastName[10] float total_Balance would anyone give a simple instruction to input/output these. i have tried everything but still doesnt work so far i have done this. #include<iostream> using namespace std; struct account_query { int … | |
Now, i input 1.5, obviously, it will show 1. But how can the program check that i just input 1.5 so that it will show an error for non integer input? #include<iostream> using namespace std; int main(){ int k; cout<<"Input: "; cin>>k; cout<< k ; } | |
how I can modify the ofile object of fstream library, and the remaining data remain save as it was. e.g ofile: hello world name class this is the data ofile have and in modification i want to replace the name with "roll number". after modification ofile became ofile: hello world … | |
I have uninstalled and reinstalled Microsoft Visual about 3 times. I am unable to link or locate the folder #include. This is preventing me from utilizing Visual because it keeps giving me errors and doesn't let me execute the program. I have researched online for various solutions and have re-downloaded … | |
#include <iostream> using namespace std; int f(int i) { if(i == 1) { return (1); } else { return 2*f(i-1); } } int main() { cout << f(5) << endl; //<--- I don't understand why this is 16. return 0; } I am having trouble understanding why f(5) = 16 … | |
i have a file that list all the names and destinations to move the file. so for example a file that looks like this def.txt /names/new/ person.obj /media/people/ panel.jpg /random/pictures/ so as you can see here there are three files that need to be moved in a specific destination. How … | |
i write code for something , now i want to have a printed copy of the softcopy output.How can i get hardcopy output using c++. i think i have to use to include some libraries to the program but i don't know where to get these library or if there … | |
//Description: Binary Search Tree with array implementation, it has inorder, postorder and pre order traversals. //Note: it is not advisable to use array in binary search tree because it consumes a lot of memory in the long run // instead use linked list this is just a reference to understand … | |
Hi there, I know this question is very common but I still didn't understand that why we can't check if array is not initialized. Isn't there a way to check an array is initialzed by any values(int, double). I am working on array based program, in which I have to … | |
#include<iostream.h> #include<conio.h> #include<string.h> #include<stdlib.h> // define maximum number of patients in a queue #define MAXPATIENTS 100 // define structure for patient data struct patient { char FirstName[50]; char LastName[50]; char ID[20]; }; // define class for queue class queue { public: queue (void); int AddPatientAtEnd (patient p); int AddPatientAtBeginning (patient … | |
Greetings, I have some problem with such needed algorithms I know the outlines but I do not know how to implement especially with recursion :( Consider a binary tree **T** of **n** nodes where every node has 4 fields: LABEL (an integer between 1 and n representing the label of … | |
I'm coming up with this error: Unhandled exception at 0x013c4218 in Hash_Table.exe: 0xC0000005: Access violation reading location 0x0000001c. Here's my driver: #pragma once #include <cctype> // Provides toupper #include <cstdlib> // Provides EXIT_SUCCESS #include <cstring> // Provides strchr #include <fstream> #include <iostream> #include <string> #include <sstream> // Operate on strings … | |
// A program to use a run-time loaded DLL.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include <Windows.h> #include <iostream> using namespace std; //Creates a new type of variable which is a function pounter called, cryptFunPointer. typedef void (*cryptFunPointer) (int key , char inString, char … | |
This function reads a text file and shows how many times a words appears in the text file, how do I save it to a different text file after running this function? std::ifstream f("test.txt"); std::istream_iterator<std::string> eof; std::multiset<std::string> words( std::istream_iterator<std::string>(f) , eof); for( std::multiset<std::string>::iterator i = words.begin(); i!=words.end(); i = words.upper_bound(*i) … | |
Hi basically I have been trying to set up the irrlicht engine with Visual Studio 2010 and after adding in the inlcude and library file paths it seems as though Visual Studio no longer recognises "stdafx.h" as a valid precompiler?? I know this has something to do with not being … | |
My function brokes. It gives 0 errors but brokes when i run it... int findk(int a,int b, int n) { int m[1000]; int j=1; for(i=1;i<=b;i++) { if((pow(2,i)>a)&&(pow(2,i)<b)) { m[j]= pow(2,i); j++; } } int k=m[1]; for(i=1;i<j;i++)if(m[i]>k)k=m[i]; return k; } | |
/*Why i can't match the input with the constant string array? It always shows the record with -1 Thank you.*/ #include<iostream> #include <fstream> #include <iomanip> #include <cstdlib> #include <cstring> #include <string> #include <windows.h> #include <cmath> string stuname[3]={"Chan Tai Man, Peter","Ng Fat Tat", "Tsang Chi Wai"}; void searchStudent(){ string search; int … | |
I was practising the question before the final semester exam, and I have a problem. #include <iostream> #include <string.h> #include <cmath> using namespace std; int num; // A number needs to be entered int o_num; // Original number int r; string str1 = "", str2 = "", temp = ""; … | |
I seem to be having difficulty with my code, I have tried many different ways but I can't seem to figure out how to implement some things. I'm also not sure how to setup my menu so only certain functions are called. 1. Adding a if statement under ShowMenu to … | |
Hi can i run a program on windows compiled under ubuntu... simply..the program was wrotten on c++ under ubuntu os thanks ![]() | |
so i want to make a terminal for my website. im wondering how would i generate the html for the base of the terminal? ie just the window that i will be writing to | |
/* * File: main.cpp * Author: TBuchli * * Write a program that helps a real estate agent calculate an average price of *up to 20 homes. An array of data type double should be used to contain the *prices. The program should prompt the user to enter the number … | |
I remember doing a class to handle rational numbers in one of my classes way back when. I decided to do it again. What I'm having trouble understanding right now is why do I even create a class when my overloaded functions are all friend functions? As I understand it, … | |
I am currently working on a project for class that reads in from a .txt file the names of a film, the year it was made, and the list of actors in said film, and sorts the info in a binary search tree. In the tree nodes, I have the … |
The End.