49,761 Topics

Member Avatar for
Member Avatar for Rohan_12

HI everyone, _SBLOCK *allocateMemBlock(size_t size) [ _SBLOCK *block = (_SBLOCK*)sbrk(0); void *memadr = (void*)sbrk(0); void *allocate_mem = (void*)sbrk(BLOCK_SIZE + size); if(allocate_mem == (void*)-1) [ return NULL; ] else [ block->next = NULL; block->isfree = false; block->size = size; block->memoryAddress = memadr+BLOCK_SIZE; return block; ]

Member Avatar for ravss
0
2K
Member Avatar for engr_3

Hy I have my data in file as Energy,utili,surplus,shortage 1,2,3,4 5,6,7,8 9,10,11,12 And I want to read this data column wise and then I want to write it to another file so that I may be able to perform some operations on it Please help

Member Avatar for DGPickett
0
317
Member Avatar for Mark_48

Hello, I am looking some help with a program. I am trying to parse the following file into a dynamic Array "Database[8][5]". Device ,Gain (beta),Power Pd(W) ,Current Ic(A) ,BVceo(V) 2N3904 ,150,0.35,0.2,40 2N2202 ,120,0.5,0.3,35 2N3055 ,60,120,10,90 2N1013 ,95,50,4,110 MPE106 ,140,15,1.5,35 MC1301 ,80,10,0.9,200 ECG1201 ,130,1.3,1.1,55 I seem to beable to parse the …

Member Avatar for rproffitt
0
366
Member Avatar for Elhussein

1) Write a program to take as input three integers for (a) incrementing, (b) skipping and (c) ending. Your program should start counting from zero, incrementing by a, skip b and end at c. Example 1: input: 2, 6, 12 output: 0, 2, 4, 8, 10, 12 2) Write a …

Member Avatar for rproffitt
0
277
Member Avatar for Taha_3

I got stuck with this problem and it will be great if someone gives a solution.

Member Avatar for JamesCherrill
0
155
Member Avatar for Dragonmh

I have been at this for weeks and I am able to get most of the errors cleared on my own. I am stuck on these errors and I am unable to find out what is really wrong and going on. I am still pretty new at this. The code …

Member Avatar for rproffitt
0
342
Member Avatar for SIyabonga12@#

i need help coding the i2c bmp280 i did start the code myself i just need a way forward

Member Avatar for rproffitt
0
164
Member Avatar for Joedanica

idk why my program is not working, i wanted to create a program that counts even and odd number when a user inputs number except 0. Zero is the terminator of the loop. #include <stdio.h> int main(){ int entNum, ans; int even; int odd; do{ even=0; odd=0; scanf("%d",&entNum); ans = …

Member Avatar for Reverend Jim
0
290
Member Avatar for Muhammad Saqib_1
Member Avatar for Larab Mustafa

If(! found || --count == 0) Count<<"danger"<<endl; Count<<"count="<<count<<endl; Explain its working plzzzz.....

Member Avatar for Reverend Jim
0
124
Member Avatar for Kevin_53

I got an assignment in which I need to create a physics calculator to solve the 'Motion' formulas, this is an screenshot of the formulas I need: [Motion formulas](https://imgur.com/a/sU8SfEk) The problem that I'm having is that I'm literally lost in how to implement them. I have found lots of tutorials …

0
243
Member Avatar for Cpptard

In the below program i am allocating memory for pointer to pointer properly and then allocating individual pointers and setting values properly, even though i am getting the garbage value to one of the structure member, i dont understand where exactly i am going wrong. Request for any expert help. …

Member Avatar for Cpptard
0
648
Member Avatar for naya22

I am working on a math tutoring program that asks the user for a seed value, gives them two random numbers from 1 to 500, and asks them to key in the correct answer. So far, here is my source code: [CODE] #include <iostream> #include <cstdlib> #include <time> #include <conio> …

Member Avatar for Gheorghe_1
0
2K
Member Avatar for Salma_6

Given two arrays (the first array and the second array) of the same size, each consisting of n positive integers, write a program to determine how many unique integers the second array has. Here a unique integer means that it shows only once in the second array but does not …

Member Avatar for Reverend Jim
1
897
Member Avatar for forbesm

Hi guys the problem I'm having is declaring the operand "op". How do you do that? #include <iostream> #include <stdlib.h> using std::cin; using std::cout; using std::endl; #include "expression.h" // include definition of class Calculator // function main begins program execution int main() // print header for Calculator inventory display cout …

Member Avatar for rproffitt
0
343
Member Avatar for cambalinho

how can i print 3 values(without knowing their string\number size) in same column using cout? i'm using these code: cout <<"\n" << "show tokens\n"; for(unsigned int i=0;i<Tokens.size(); i++) { cout << "Token: " << Tokens[i].Token <<right<<setw(20-Tokens[i].Token.size())<< "Type: " << Tokens[i].Type <<setw(40) << fixed << "Position Line: " << i<<"\n"; } …

Member Avatar for rproffitt
0
1K
Member Avatar for joao_9

hello i am developing an application in c ++ and mysql and i am having a lot of difficulties in more specified login in the query where the query needs the user and the pass which are in variables. Can anyone help me? Thanks.

Member Avatar for rproffitt
0
2K
Member Avatar for Pierce_1

How to solve this problem in Code Blocks? Output: Enter 1st number: 10 Enter 2nd number: 10 Enter 3rd number: 10 Enter 4th number: 10 Enter 5th number: 10 Sum of five numbers: 50 Average of five numbers: 10

Member Avatar for rproffitt
0
116
Member Avatar for Rohan_12

Hello Everyone, I have an FPGA application that has some function (i.e: Matrix Multiplication) now I want to create the memory interface for FPGA communication based on the model pushed into the FPGA? For example, If we have the size of 1024 and the size of data is 10 bit …

Member Avatar for rproffitt
0
412
Member Avatar for seiya
Member Avatar for J'nae Thomas

I want a calender to appear, making it so that the customer can chose the dates. #include <iostream> #include <string> #include <ctime> using namespace std; double SubTotal=0.00,Total=0.00, Dis=0.00, DisGCH=0.40, DisConf=0.15, DisSpec=0.05; int NoOfDays=0, TelNumber, CreditCN, GoldCN, RPriceSing=175.00, RPriceDoub=250.00, ConfN; string LName, FName, Address,Occupancy, DisType,GoldCardHolder,ConfDel, CheckInDate; int main(){ cout<< "WELCOME TO …

Member Avatar for rproffitt
0
552
Member Avatar for guitarrick

[I]Last project for the semester and it's late!!! I am in need of some logic with this one....It seemed simple, but now it's out of control. My array with the ASCII converter works, but I can't seem to develop a complete output function to output this 'counter simulator.' Here's the …

Member Avatar for Gabby_2
1
2K
Member Avatar for cambalinho

i'm creating a program using Code Blocks with GNU\GCC compiler. i'm using Windows 10 with Windows Defender. my program create a txt files(instead a text files, we can speak binary files too), but the Windows Defender can delete the file(and i have sure), for avoid these problem i must disable …

Member Avatar for cambalinho
0
4K
Member Avatar for yobbko

I need help with reading data from web page. I wanted to do database of rates (forex). For example: whan price is (eur\usd) 1.4231 then 1.4230 then 1.4229 then 1.4230. I wnated to make text file and application (c\c++) write there those price. In tex file: 1.4231 1.4230 1.4229 1.4230 …

Member Avatar for baabroz1
0
425
Member Avatar for misstj555

Hi. I wanted to review the idea of "Link List" but using C++ and not Java. I borrowed a header file from a textbook to test how a link list works (I know that if I don't paste the whole code [its not my code anyway. It was from a …

0
181
Member Avatar for poop_2

I need help with a code for averaging grades it works on a online compiler but it doesn't work on visual studio 2019

Member Avatar for rproffitt
0
361
Member Avatar for cppcoder

Hi there everybody just needed some help sorting an object array. So the array takes in a title, link, comment, length, and rating of the video. Once the values are put into the array the user inputs whether they want to sort it by title(alphabetically), length of the video (ascending …

0
177
Member Avatar for casey.li.146

Hi All, i would need some advice from you guys from this forum to solve the reading of the CSV file that i had. for example, i have a file which consist of about 2000 records (below are the example of the records) 10/10/2013 10:25:09 AM,5.89,45,264.83,PTTTT 10/10/2013 10:25:13 AM,5.89,2000,11780.00, Some …

Member Avatar for ming_1
0
6K
Member Avatar for Yuichi

I am supposed to sort an array in ascending order..I have tried but then i cant get the results i want.I also tried to look it up in this forum but i still can't get it...Here is part of the code:[ICODE]void sort() { int size=10; int j,temp,i; for(i=0;i<(size-1);i++) { for(j=i+1;j<size;j++) …

Member Avatar for bangalore.webguru
-1
4K
Member Avatar for rahman_5

Like: if i Can saw what is Happening inside of my code i will understand what type of method i'm actually using ..Like: binary search or stack or Dynamic programming or using special type of algorithm which already developed by someone? Did you guys know ..how i can solve this …

Member Avatar for zevgriner
1
963

The End.