473,544 Members | 2,299 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

C / C++ Forum

C / C++ programming language - Get answers to questions about compilers, visual C++, templates, namespaces, classes, data structures, OOP (object-oriented programming), inheritance, data types, exceptions, Standard Template Library (STL) and the C Standard Library.
1
1,088
thread by: akhiltata | last post Jul 29 '16 by: weaknessforcats
print these numbers 6 28 66 in form of pyramid like 00006 00028 00066
0
982
thread by: sarikas | last post Jul 28 '16 by: sarikas
I need to develop an application that detects the hard disks connected and then get the details and report bad drives.. Do I need to read only the MBR or the all the sectors on hard drives...
0
911
thread by: Sohail Noor | last post Jul 26 '16 by: Sohail Noor
draw a square its lenght of line should be 100 cm and draw a circle that toched with the wall of a square internally using rectengle functions and cicle functions????
1
1,090
thread by: Humza ch | last post Jul 25 '16 by: weaknessforcats
#include<iostream.h> Using namespace STD; Struct students { char name; Int age; }; Main(); { Students s;
6
1,931
thread by: Sergenj | last post Jul 23 '16 by: Sergenj
I would like to find the highest value within an array of complex numbers. Let assume this is the function I want to modify in order to get the highest values of array y : //iterDelayEst.cpp #include <vector> #include <algorithm> #include <iterator>
2
1,361
thread by: Egoist | last post Jul 21 '16 by: donbock
Write a program that asks the user to enter 10 integers. The program should print how many positive numbers are entered, how many negative numbers are entered and how many zeros are entered. how do I solve this using do or while or for statements ? :/
15
45,207
thread by: Amjad Ali | last post Jul 18 '16 by: Amit0007
What is "linker error : Unable to open the file ' TCLASSS.LIB' " ? How can I correct it?
6
24,924
thread by: morshruti | last post Jul 17 '16 by: nirjhor003
hey i am a student and i want a C program to compute the first and follow of any given productions.Plzzz rply soon......
2
1,265
thread by: codelife | last post Jul 15 '16 by: donbock
I'm workig on memory allocation and trying to understand this code. output prints i=0 d=149909512 - How is d getting these numbers? *d=0, i=5, d135145. how can d have these numbers if malloc returns the address of the beginning of allocated memory or NULL if it fails. #include<stdio.h>
6
1,725
thread by: radha gogia | last post Jul 10 '16 by: radha gogia
Given an integer ‘K’ and a tree in string format. We have to print the sum of all elements at Kth level from root. 0 / \ 5 7 / \ / \ 6 4 1 3 \ ...
1
2,843
thread by: kartikchebrolu | last post Jul 9 '16 by: weaknessforcats
I was trying to read a matrix in .txt file into 2d array by fscanf function but the output was wrong. int main() { int r, c, graph; FILE *fp; fp = fopen("AdjacencyMatrix_of_mat_G_N.txt","r"); for(r=0;r<V;r++) { for(c=0; c<V; c++) { if (!fscanf(fp, "%lf", &graph))
0
1,192
thread by: Xillez | last post Jul 9 '16 by: Xillez
Hey, I made a program for 2D Angle Movement. Now the user sets the degrees the triangle should move and it does, but it doesn't go correctly. 0 degrees is to the right of the window. It started in the center of the window and went down left... as far as I know that isn't 180 degrees. It's more like 225 degrees. why does it do this?
1
1,138
thread by: vegaonline | last post Jul 8 '16 by: weaknessforcats
It may be silly. However, I am now at loss and can't think. So I request handle to move. I have a class like- class hodo { public : int sensorDet; trigger Trigger; ::: } Now I have a header called base.h contains
3
1,237
thread by: DrenDevant | last post Jul 8 '16 by: weaknessforcats
In my Main.c file I declare a structure: typedef struct FlagStructure{ unsigned int RxActive:1; unsigned int TxActive:1; }FlagStructure; FlagStructure SerialFLAG = {0,0}; I can then set a bit SerialFLAG.RxActive =1
1
1,164
thread by: ctuck003 | last post Jul 2 '16 by: weaknessforcats
SMy instructor gave me a psuedocode but I'm still stuck. get a char while not end of input: change char so it's 0-25 shift it forward the appropriate value "normalize" it so it's still 0-25 change char back to a letter by adding 'a' to it print it get next char end while
1
1,324
thread by: pratz | last post Jun 28 '16 by: hpmachining
Hi, How do I find the differences between BOOST 1.33.1 and latest version? We are using the older version and I want to upgrade to the latest if there is a strong case. Thanks.
2
1,352
thread by: nupurchoudhary | last post Jun 17 '16 by: nupurchoudhary
I have required setup in my .gdbinit file to print all STL objects. I copied code from https://gist.github.com/skyscribe/3978082 to .gdbinit. Then, I run my .cc code, which print all STL objects, other than std::List. It gives some data which is not understandable. Can somebody suggest what I am doing wrong. I just have 2 lines in my .cc code for...
4
2,524
thread by: lonelycoder | last post Jun 16 '16 by: weaknessforcats
Hello, I am new at this forum and this is my first post. Today, I was solving problem no. 1827 in URI online judge. Problem link I wrote my code and tested it and it was giving correct answer and I am pretty sure that my logic is correct but in the online judge it is showing 90% wrong thus not accepted. I could not figure out the problem in...
1
1,239
thread by: vedansh3103 | last post Jun 12 '16 by: weaknessforcats
#include<iostream.h> #include<conio.h> #include<stdio.h> void package(); void main() { clrscr();
3
1,583
thread by: TLeq | last post Jun 9 '16 by: weaknessforcats
Getting this error upon running my .exe ... Compilation goes FINE :/ Here's my CLR code: header: // AddingWrapper.h #pragma once #include "stdafx.h"
1
1,202
thread by: abc12345 | last post Jun 7 '16 by: donbock
What is the value of 2%4*3? Is it 2%(4*3) = 2%12 = 2 or (2%4)* 3 = 2*3 = 6 I checked precedence rules and they say % and * have same precedence and left- to- right evaluation in case of same precedence. So, in that case, 6 must be the answer. But when I checked calculators online, they returned 2 as answer. So, please...
3
1,240
thread by: Vaibhav Tambat | last post Jun 1 '16 by: Vaibhav Tambat
‪#‎include‬<stdio.h> #include<conio.h> int main() { int i, j, n=20, temp,c; do{ temp=n/4; for(i=1; i<=n/4; i++) {printf(“\t\t”); for(j=1; j<temp; j++)
2
1,244
thread by: yerayaw | last post Jun 1 '16 by: donbock
// LCD module connections sbit LCD_RS at RB2_bit; sbit LCD_EN at RB3_bit; sbit LCD_D4 at RB4_bit; sbit LCD_D5 at RB5_bit; sbit LCD_D6 at RB6_bit; sbit LCD_D7 at RB7_bit; sbit LCD_RS_Direction at TRISB2_bit; sbit LCD_EN_Direction at TRISB3_bit; sbit LCD_D4_Direction at TRISB4_bit;
1
1,775
thread by: tetey | last post May 27 '16 by: weaknessforcats
hi i am running the code with manGW on windows 8 and am getting error with the ouportb inthe int main() function below it my code and the specific error CODE: #include<dos.h> #include<stdio.h> #include<conio.h> #define PORT 0x378
2
1,417
thread by: abeni | last post May 26 '16 by: weaknessforcats
How do I send input on batch programming? i mean for C++ we use this header file to input txt include <sstream> and also we use this data types ostringstream ; istringstream;

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.