49,761 Topics
| |
Hello programmers! I have been working on a hardware store application, where there is a `HardwareRecord`class that stores information about each object in a store (ex: nuts, bolts, screws, and so forth). Here's my declaration of this class: // HardwareRecord.h // Initialize Hardware Store File // // // Definition of … | |
Hi, I m facing some trouble in c++? I want to know how to write equivalent c++ statement from these c codes struct stat sb; // this is struct, will be same in c++ printf("I-NODE NUMBER: %ld\n", (long) sb.st_ino); // this is C statement // c++ statement of above statement … | |
I am writing a program for date class, but facing an error in definition of constructor. I am pasting my code below: Note: i am using compiler devC++ 4.9.2.2 and not need to add 'using namespace ' in this compiler. If you a using other compiler then you have to … | |
Hello to all! I am a begginer to C++ and writing a class . Actually my program runs perfectly but there is logical error. My compiler is devC++. the output of my program should be as follows: Enter your name: john Enter your rollno: 45 Enter your semester:4 Enter your … | |
Hey guys, I need help with another one of those I/O File coding. I am super clueless and this is what I have so far: /*Write a program that merges the numbers in two files and writes all the numbers into a third file. Your program takes input from two … | |
please help me i need to make a program to calcutale the grade of a student with a prelim = 20% midterm = 20% prelfinal = 20% final = 40% ` = 100 %` | |
using namespace std; struct karmand{ char nam[10]; char shomare[10]; char sx[10]; char mm[10]; char rgh[10]; }list[s]; void search(); void prin(int i); void input_file(); void enter(); int a; void menu_select(){ char p[10]; int c; system("cls"); printf("1)enter a record:\n"); printf("2)sort the file:\n"); printf("3)search the file:\n"); printf("4)quit:\n"); do{ printf("please enter your choice:"); gets(p); … | |
Hello All, long time no see, I'm seeking for websites that provides practices of C++ and Java examples for programming students, the idea is to give me a programming question to solve in order to train myself. thanks. | |
**The special rules for inline functions require that they be defined in each file in which they are used.The easiest way to make sure that inline definitions are available to all files in a multifile program is to include the inline definition in the same header file in which the … | |
I have this assignment due this weekend and I was able to figure it out but for some reason the last part of my output is going up to 38 and I have no clue to way it would be doing that any thoughts to way. my output: output: PRINTING … | |
#include<iostream> #include<cstdio> using namespace std; int main() { int test; scanf("%d",&test); while(test--) { int n,m; cin>>m>>n; bool arr[n+1]; for(int i=0;i<n;i++) arr[i]=true; int p=2; for(int i=2;(p*i)<=n;i++) { while((p*i)<=n) { if((p*i)>n) break; arr[(p*i)-1]=false; p++; } p=2; } for(int i=m-1;i<n;i++) { if(arr[i]==true&&i!=0) cout<<i+1<<endl; } } return 0; } **i am trying to generate … | |
Hi all, Ok - there's nothing like a BIG challenge to start off my exploration into programming. Given that I'm a complete newbie with more build errors than a builder having a bad day (bad pun!), what I'm really looking for is someone to hold my hand a bit and … | |
**The special rules for inline functions require that they be defined in each file in which they are used.The easiest way to make sure that inline definitions are available to all files in a multifile program is to include the inline definition in the same header file in which the … | |
trapezium pattern points for interger n plz let me knw if any body knw the program in cpp | |
Hello All, Well this is not exactly a C++ question. More of a math one. But I've seen many guys work on GameDev in this forum. So, posting it here. Here it goes: I was reading an article to check if a point in view frustum and i read some … | |
I have error in my program.I want to display name in order by using radix sort | |
I want to order this program by name in descinding order. #include <iostream.h> #include <stdio.h> #include <conio.h> #include <string.h> #define MAX 10 struct std{ char name[20]; int age,year; }; class radixsort{ struct std arr[MAX]; int n,i; public: int a[]; int b[]; void getdata(); void showdata(); void sortLogic(); }; void radixsort … | |
Hello, So I was testing my matrix class and the results look questionable and the inverted matrix isn't returning the vertex to it's original value (a seperate issue). Given a perspective projection at 45 degrees with a near of 1 and a far of 1000, the camera at the orgin … | |
I have a c++ project that is due on friday. please help :( Codes should not be too advanced. Use loop or array. >Introduction: An interesting sequence of numbers can be generated using any given integer using the following procedure: 1. First, arrange the digits of the given number in … | |
Please excuse me if this is silly.. I do want a clear picture of how we can use a singleton class?? I do read many answers here. But I didn't got anything clear. I need a simple program explaining **singleton class**. Please give me the explanation of each and every … | |
Please geeks how can i use/access the initialization list for my class. So that can do something like this... MyClass foo = {value,value,value}; | |
I am just a beginner and want to make a project for my 12th standard i want to know whether i could formatt font style in c++ if yes kindly send me the code snippet to <snip> thanks in advance ... | |
| Greetings everybody, I have used VS for long, and for one of my projects I used MonoDevelop to run it under Ubuntu, of course I was using C#. I have a kit, a bit expensive :), and I need not only develop a program but also develop a real-time DSP … |
write a c++ write a c++ programe that accept resalt frome the user and displays grade and remark as follows if resalt >=90 the grade 'A' Remark 'EXCELLENT' if resalt >=80 the grade 'B' Remark 'VERYGOOD' if resalt >=70 the grade 'C' Remark 'GOOD' if resalt >=60 the grade 'D' … | |
My header file header.h #ifndef HEADER_TEST #define HEADER_TEST static test_variable; #endif now i am including this in two source files IN THE SAME PROJECT. multiple definition error. i have used static specifier in header file . please help me understand this.i think static makes internal linkage. regards, ravi | |
# Tutorial On Operators# *Operators are the signs to the tell the compiler to perform specific task*. The Operators fall into following categories :- Arithmatic Operator Relational Operator Logical Operator Bitwise Operator Miscellaneous Operator(i added Assignment Operators in this categeory) **Arithmatic operators:-** There are following arithmetic operators:- + Add [6+2=8] … | |
Hello guys. I need an idea. How can I calculate GCF of many numbers? I thought I could calculate two by two numbers, but it not seems to be a very effective idea. There is my function: int gcf (unsigned int x, unsigned int y) { return (y == 0) … | |
Hello again I'm working with the Poco internet library trying to understand it but I have come across some syntax that I don't quite understand. This may be a beginner question. Here it is: Poco::AutoPtr<Poco::Notification> pNf (_queue.waitDequeueNotification); I know AutoPtr's contain a count of how many objects reference the object … | |
Hello everyone, Im very new to c++ and dont have very much experience. But Im working on a programm and for that programm I need ms sql connection. Ive already googled much but I couldnt find what I need. Now I would like to ask here if someone know where … |
The End.