49,761 Topics
| |
Hi. Why am I getting different output when I call the calculate() function? The output on line 184 gives 1.0001, while the output from line 433 gives 1. Thanks. #include <iostream> #include <string> #include <limits> #include <vector> #include <iomanip> using namespace std; /** * Global Variables */ string k; int … | |
i'm not sure if a pointer can do the job of an iterator, or otherwise, or they are different things? | |
gimme the error plz it says undefined symbol _main in module c0.asm #include<iostream.h> class largest { private : int num1,num2,num3,big; public : void enter(int a,int b,int c); void max(void); void display(void); }; void largest::enter(int a,int b,int c) { cout<<"Enter numbers n"; a=num1; b=num2; c=num3; cin>>a>>b>>c; } void largest::max(void) { big=num1; … | |
how I can introduce printf and scanf in microsoft visual c++ 2010 express i used #include<stdio.h> , #include<isotream> and using namespace std; put it still doesnt work ??? | |
hi so this project requires an input of U, M, or D and as many as you like of them (i think, might be only up to 100 based on charUMD[100] array in code) also, you have to end it with # in order to indicate the end. i am … | |
You are required to write a C++ program to covert a positive inter code into English name equivalent for the digit. A valid code is of size between four (4) to six (6) digits inclusive. A zero is not allowed in a code. Example: If input is 234056 the output … | |
I really love working with structs, and I get how they work and everything. And I know my issue right now is the math (I'm horrible at math!) But my problem: I need to create a program that reads from a .txt file of employees (let's say 5) an they're … | |
Hey all, I've been making a caesar cipher but seem to have encountered a problem. My program reads an integer from a text file and stores it as the shift value. Then my goal was to add that shift value to the alphabet array. Here is a part of my … | |
Hello, I have this program that runs in C++ that I need to run in C. This is my program in C++: #include <iostream> #include <string> #include <cctype> using namespace std; char encode (char plaintext) { if (isupper(plaintext)) { if (plaintext > 'M') { plaintext += 13; } else { … | |
Could anyone explain the problem im having on line 28, (value = amp*sin(2*pi*freq*t);) i keep getting this error message 28 11 [Error] cannot convert 'double' to 'float*' in assignment #include <cstdlib> #include <iostream> #include <math.h> #include "dp_lib.h" using namespace std; int main() { double pi=3.141592653589793238462643383279502884197169399375; float* value; unsigned long length … | |
So decided I should switch to VS13 for the added benefits. Copied the cold, transfered the files, alls good right? Wrong. Actually its not that bad. Just one main problem. `ltm` See this fella? This is the one guy that is standing in the way of me and the debachury … | |
so im trying to convert my code from localtime to localtime_s. it was this: time_t now = time(0); tm *ltm = localtime_s(&now); i seem to be having some strctual errors. Can i have some help? | |
Hi, While executing below code i am getting error like "memory clobbered before allocated block" and due to this assignment is not happening. could you let me know what can be reason for the same. I do understand it is not good to use raw pointer but in current scenario … | |
We were given a task to use lists and iterators. We were supposed to make them from scratch. I'm done with that. The problems that I'm having are as following: 1. I'm not able to access the list made of Course datatype which is present in each Student instance. Does … | |
This assignment asks to add some code from to a previous assignment I had. I have been confused about this overload operators alot and im confused on how to do it in my code any help with this will be good A) overload the >> operator to allow for reading … | |
So I've begun using a library called Poco. My program doesn't do what its supposed to yet I've checked over everything. The code is: #include "stdafx.h" #include <iostream> #include <Poco/Debugger.h> #include <string.h> #ifdef POCO_ARCH_LITTLE_ENDIAN std::string endianness = "Host byte order is Little Endian.\n"; #else std::string endianness = "Host byte order … | |
I'm fairly new with arrays but from my understanding it is set up as so: datatype arrayname[#of elements] = {elements}; I was wondering why this code doesn't work typedef char alphabet[26] = {'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', … | |
Hello everyone. I need some help on creating a slot machine. It needs to have the option of playing a three wheel & four wheel machine. I've created separate functions for those two. I think I understand the whole random generating concept, but I'm having a hard time figuring out … | |
I am new to C++ and i don't understant this error message i am recieving. Could you show me the solution? ([Error] name lookup of 'n' changed for ISO 'for' scoping [-fpermissive]) line 25, col 17 (the 'n' is the problem) #include <cstdlib> #include <iostream> #include <math.h> #include "dp_lib.h" using … | |
write a c++ programme that read an unknown number of integers value and then print count, sum and average of 1. even value 2. odd value 3. negative value 4. positive value thank you | |
**what can i do with this errors?please help me! thanks** >#ifndef WS2811_h >#define WS2811_h >#include <avr/io.h> >#include <util/delay.h> >#include <WS2811.h> **Error 1 unterminated #ifndef** >typedef struct __attribute__ ((__packed__)) { > uint8_t r; > uint8_t g; > uint8_t b; >} RGB_t; **Error 2 expected ':', ',', ';', '}' or '__attribute__' before … | |
I have a question about classes and header files. As I see the trend of reusing classes, I would like to start building the classes in their own file, and be able to call it, and use(#include "class.h") to include them. I am a little bit confused because I understood … | |
what do you prefere for naming: database - c++ - java - php? 1- User_id - User_Name 2- user_id - user_name 3- UserId - UserName 4- userId - userName 5- else | |
Assalam o Alikum my question is that what is the difference between character array and string. my instructor is use char str [50] instead of string str. and i can not understand what is difference between them. | |
Hi. I'm trying to implement a disk scheduling algorithm using a vector. I am able to find the smallest element of the vector with my findMin() function: int computer::findMin( vector<int> v ) { int minIndex = 0; for( int i = 1; i < v.size( ); i++ ) if( v[ … | |
hi can u please help me solve this question. A small company dealing with transportation has just purchased a computer for its new automated reservations system. You have been asked to program the new system. You are to write a program called ReservationSystem to assign seats on a vehicle. Your … | |
hallo everyone i am lookng for some sample c coding for fuzzy logic, can anyone help me in developig fuzzy logic in c,.. i had developed the fuzzy logic in matlab, now i need to write the code in c, looking for some sample code,.. | |
Well this is quite a large program so there is a lot of information to sort through, but when I compile it now it comes up with this: /Users/Adam/Adam's Work/Programming/C++/Code/OS2.cpp: In member function ‘virtual int dbase::todo()’: /Users/Adam/Adam's Work/Programming/C++/Code/OS2.cpp:393: error: invalid conversion from ‘const char*’ to ‘int’ /Users/Adam/Adam's Work/Programming/C++/Code/OS2.cpp:394: error: invalid … | |
1. This assignment asks to add some code from to a previous assignment I had. I have been confused about this overload operators alot and im confused on how to do it in my code any help with this will be good A) overload the >> operator to allow for … | |
i found following code to create a two dimensional array at run time if one of the dimension is known.. char (*c)[5]; c=new char[n][5]; first line is pointer to an array of 5 integers but i couldnt undesratnd the second step. |
The End.