49,757 Topics

Member Avatar for
Member Avatar for Brittany_1

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 …

Member Avatar for David W
0
145
Member Avatar for michelemalta

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 …

Member Avatar for vmanes
0
209
Member Avatar for SerenityG

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 { …

Member Avatar for David W
0
226
Member Avatar for Jake_4

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 …

Member Avatar for StuXYZ
0
4K
Member Avatar for CreatorZeus

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 …

Member Avatar for JasonHippy
0
242
Member Avatar for CreatorZeus

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?

Member Avatar for CreatorZeus
0
5K
Member Avatar for can-mohan

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 …

Member Avatar for can-mohan
0
443
Member Avatar for hamzabinamin

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 …

Member Avatar for StuXYZ
0
208
Member Avatar for sparky58

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 …

Member Avatar for Banfa
0
391
Member Avatar for Curious Gorge

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 …

Member Avatar for Curious Gorge
0
248
Member Avatar for michelemalta

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', …

Member Avatar for nullptr
0
291
Member Avatar for Brittany_1

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 …

Member Avatar for vmanes
0
571
Member Avatar for Jake_4

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 …

Member Avatar for Labdabeta
0
7K
Member Avatar for abrahem.aljazazy

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

Member Avatar for abrahem.aljazazy
-1
74
Member Avatar for bignobela

**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 …

Member Avatar for sepp2k
0
169
Member Avatar for daniel1977

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 …

Member Avatar for rubberman
0
157
Member Avatar for ckide

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

Member Avatar for Ancient Dragon
0
305
Member Avatar for moaz.amin.37

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.

Member Avatar for moaz.amin.37
0
364
Member Avatar for smitsky

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[ …

Member Avatar for mike_2000_17
0
296
Member Avatar for Totoo

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 …

Member Avatar for Ancient Dragon
0
270
Member Avatar for kalidas.rajendran.1

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,..

Member Avatar for ddanbe
0
138
Member Avatar for softwaretime

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 …

Member Avatar for frank.dekievit.50
1
13K
Member Avatar for sparky58

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 …

Member Avatar for Ancient Dragon
0
287
Member Avatar for ravi_14

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.

Member Avatar for Ancient Dragon
0
290
Member Avatar for eortiz10

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 …

Member Avatar for klikendish
0
2K
Member Avatar for moaz.amin.37

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

Member Avatar for deceptikon
0
846
Member Avatar for moaz.amin.37

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 …

Member Avatar for Kristian_2
0
870
Member Avatar for misge
Member Avatar for mcconnell_34
0
108
Member Avatar for babiiros

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 …

Member Avatar for Ancient Dragon
0
396
Member Avatar for Zcool31

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 …

Member Avatar for Константин_2
0
19K

The End.