49,757 Topics
| |
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. | |
Need a little help please: i have been trying to complete this for a couple days but i get more and more confused everytime i try. When an object is falling because of gravity, the following formula can be used to determine the distance the object falls in a specific … | |
my question is that when we use static data member and ststic function and nobody can not satisfy me about this question i need actual reason of using the static data member and ststic member function | |
write a c++ class run that contains followin data member 1)name of runner. 2)distance covered by runner. class ha following member function 1)get function for input runner name and distance. 2)show function to display runner name and distance. the user should be able to show the name of the runner … | |
i"m new at this.. please help me! i keep getting this error Error 5 error C2360: initialization of 'levelOne' is skipped by 'case' label. I get a "transfer of control bypasses initialization of:" error when i try to build the following switch: void ViewCourses() { int choice = 0; cout<<"Please … | |
I'm trying to write a simple game using SDL and OpenGL. Up until now, I was using purely SDL and pixel manipulations on the framebuffer to draw lines and other shapes. However, as you would expect, that got unbearably slow as the number of objects on the screen increased. Now … |
The End.