49,761 Topics

Member Avatar for
Member Avatar for allen_1

#include<stdio.h> #include<conio.h> typedef struct process{ char pname[20]; int at,bt,wt,ta,end; }processes; int main(){ processes P[10]; processes z[10]; processes et[10]; processes wt1[10]; processes ta1[10]; int a,b,n,x=0,st,y,w; float aveta,avewt,sumta=0,sumwt=0; printf("Process Scheduling Algorithm:\n"); printf("SHORTEST JOB FIRST\n"); printf("--------------------------------------\n"); printf("Enter No. of Process: "); scanf("%d",&n); printf("\n"); for(a=0;a<n;a++){ printf("Enter Process Name P[%d]: ",a+1); scanf("%s",&P[a].pname); } printf("\n"); for(a=0;a<n;a++){ …

Member Avatar for Sahil Singh
0
630
Member Avatar for cambalinho

i have these GNU macro: #if defined __GNUC__ #define EVENT [[gnu::weak]] #elif defined __clang__ #define EVENT [[llvm::weak]] #endif #define IS_EVENT_DEFINED(sym) (static_cast<bool>(sym)) these macro works fine. and help me test if the function(even with a prototype) was defined. my problem is can i convert [[gnu::weak]] to Visual Studio code(for be compatible)? …

Member Avatar for rproffitt
0
413
Member Avatar for Olz_1

We need to implement this game MS Visual C++,using animation.You have scattered letters and from them you have to make up a word,if you guess the word you get n points(n=size of word) ,the button "hint " removes 3 points,from the accountant by prompting one of the letters ,a "new …

Member Avatar for Reverend Jim
0
238
Member Avatar for Aliyah_1

hello there. i needed a little help in writing coding for reading multiple lines of data from a .txt file that are seperated by commas. Student Name, Student ID, Mark Ada Lovelace , S001 , 99 Barbara Liskov , S0123 , 44 Carol Shaw, S0023 , 55 Donna Dubinsky , …

Member Avatar for rproffitt
0
613
Member Avatar for Aliyah_1

Hey. My question is to read from a csv file and provide a user functionality to sort and output the data by grades, name and student id.. The code is compiling and running. The trouble I am getting now is outputting the file to different files when being sorted out …

Member Avatar for Aliyah_1
0
264
Member Avatar for pato wlmc

Well, right now i'm following a tutorial on game making for c++, but is this really the best programming language for video games? Also i'd like to know if can recommend me a book ( i've seen some book on amazon but i don't really know wich one to choose …

Member Avatar for Reverend Jim
0
10K
Member Avatar for Meghna_1

**Question**Accept a character C and a positive integer N as input. The program must print N characters starting from C. Input Format: The first line contains C and N separated by space(s). Output Format: The first line contains N characters. Example Input/Output 1: Input: a 4 Output: abcd Example Input/Output …

Member Avatar for ddanbe
0
295
Member Avatar for conrad_3

Write a program in with a function that takes two int parameters, adds them together, and then returns the sum. The program should ask the user for two numbers, then call the function with the numbers as arguments, and tell the user the sum.

Member Avatar for Reverend Jim
-1
174
Member Avatar for vegaseat

The snippet shows how to create a menu on a windows form and test it. Original code via BCX, modified to compile with Dev C++ as a Windows Application. This approach does speed up writing of GUI programs.

Member Avatar for iman_1
1
5K
Member Avatar for Grace_10

Urgently need help ASAP!!! If anyone could help me with these questions, i would be so grateful. 1) write a program tht allows the user to enter a part no. tht consists of 4 or 5 characters. D 2nd and 3rd characters represent the delivery method as follows: "MS" represents …

Member Avatar for ddanbe
0
412
Member Avatar for devfeel

I have developed a sniffer code in C language. Now i am creating user interface for that. I am using visual C++ to design user interface. Once the program starts it stores each packets ip address, port number , protocol type ,time etc in respective variables. Now i want to …

Member Avatar for k_8
0
2K
Member Avatar for Mayank Singh

Hi all, Here is the code in c++ and i am new to coding world hence i need little help in converting this code into R #include <iostream> #include <cmath> #include <fstream> #include <string> using namespace std; int main(int argc, char *argv[]) { std::string protein; ifstream aa; aa.open("aa.txt"); //we are …

Member Avatar for rproffitt
0
331
Member Avatar for cambalinho

the C++ have virtual functions, but, for me they have 1 problem: on derived class, i must prototype them, for define them on Global Scope. how can i avoid the re-prototype them on derived class? i tried 1 way: template <class Type> class TypeHasToString { // This type won't compile …

Member Avatar for cambalinho
0
524
Member Avatar for emilio_3

//Create a random 10 character password with the first character being a upper case letter. The remaining characters are random selections of Upper case //letters, lower case letters, 9 digits and/or special characters (found only on the top row of your keyboard). Please exclude 0 and O's from being used.After …

Member Avatar for ryantroop
0
578
Member Avatar for Toni_7

i have 2 sperate projects which i am trying to run together as a shared project but i am failing hard……. Basically, first project does infix to postfix notation and the second projects does postfix evaluation. tried to run all that in 1 project but i keep getting all sorts …

Member Avatar for Toni_7
0
704
Member Avatar for Mike_51

Hello, all. I am trying to calculate entropy, and I cannot get the calculations correct, or match the results with the assigned if-statements. I get a number that differentiates a bit from the answer that I want. So far, this is my code: #include <iostream> using namespace std; float Entropy(float …

Member Avatar for xrjf
0
1K
Member Avatar for Toni_7

Hello, I am building a calculator in c++ windows application form, i want the calculator to handle multiple operator precedence (for example, 2+4*5/3). but i am not sure how to write the following code on my windows form project. Any suggestions would appreciated . #include <iostream> #include <conio.h> using namespace …

Member Avatar for rproffitt
0
2K
Member Avatar for Reverend Jim

There are a number of very old threads on CUDA so I'm starting a new one rather than resurrecting an old one. Does anyone here have any experience setting up and developing in CUDA on a Windows platform? I know that there is a system that can be set up …

Member Avatar for Reverend Jim
0
3K
Member Avatar for mrgreen108

in working with my 2d arrays, i have to read in from an input file a char array of NxN and manipulate the matrix in various ways. i have gotten just about everything finished, except i cannot figure out the logic of shifting a row left or right, or shifting …

Member Avatar for happygeek
0
1K
Member Avatar for Josh_6

Good Morning everyone, My intention is not to get someone to do the whole code to help me but I'm currently learning c++ and I'm working on a homework project to create 10 small programs inside of 1 code and I'm having a hard time doing the last one. It …

Member Avatar for ryantroop
0
526
Member Avatar for Ojelabi

Please i need your suggestions on how to design a system that will diagnose malaria or typhoid by accessing a number of symptoms.

Member Avatar for Ojelabi
0
782
Member Avatar for Trevah

A c++ program that prompts the user to input east or west, if the person inputs east, it prompts the user to input Northeast or Southeast. If the user inputs Southeast, it outputs "You have gone Southeast" however if the person inputs Northeast, the program outputs, "You have failed 1000 …

Member Avatar for Reverend Jim
-1
233
Member Avatar for David_94

Hello, Daniweb -- I have a C++ library, for which I am trying to make a Python interface. I have come across a linking issue which I haven't been able to solve. The library has a series of header and source files, and I am looking for a way to …

Member Avatar for rproffitt
0
3K
Member Avatar for James_95

I’m new to this and talking an intro class. I’ve read and reread my course material so far and I can’t get this line to work. It has to display You have 2 even and 3 odd numbers but no matter what I do, it keeps coming out with 0 …

Member Avatar for Smith5646
0
390
Member Avatar for Zack_9

Hi yall! I have to create a priority queue with out using built in librarys. I have tried to write a bit of code so far, however I dont know if it works and am a little confused on a few things. What follows this line is the main cpp …

Member Avatar for Schol-R-LEA
0
872
Member Avatar for Hamsterking

hello coders, i hope you all are going well, one thing blows my mind today in c i can't explain it this is why title is akward, so the thing is i have an array called tab[n] i wanted to invert it elements from tab[0] to tab[n-1] and and the …

Member Avatar for Hamsterking
0
466
Member Avatar for Zack_9

Hi all! I need help understanding what my teacher expects from this project. Here is the link to the instructions for the project: http://cs.ecu.edu/~karl/2530/spr18/Assn/Assn5/assn5.html I wrote a little bit of code but i am stuck and dont know how to move forward This is as far as ive gotten with …

Member Avatar for Schol-R-LEA
0
368
Member Avatar for Hansly

#include <SFML/Graphics.hpp> #include <time.h> #include "Connector.hpp" using namespace sf; int size = 56; Vector2f offset(28,28); Sprite f[32]; std::string position=""; int board[8][8] = {-1,-2,-3,-4,-5,-3,-2,-1, -6,-6,-6,-6,-6,-6,-6,-6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, …

Member Avatar for John_191
0
472
Member Avatar for Joel_10

Please help! I'm new to programming and my Program is outputting user's input twice. Right now It looks like this when its outputted: Floor Room Available Occupied Occupancy Rate ------------------------------------------------------------------ 1 15 10 5 33.33% 2 15 10 5 33.33% QUESTION: I realized an array is needed but what would …

Member Avatar for Joel_10
0
402
Member Avatar for kes166

Good Evening, I'm working on my final project and I'm having an issue with reading input from a file and converting the string into an integer - specifically with the first character being read from the file. Here is the data in the .txt file created in notepad: 6 -1 …

Member Avatar for kes166
0
2K

The End.