51,593 Topics

Member Avatar for
Member Avatar for kamilacbe

Hi, this might be kidish to people over here , am trying to migrate code from c++ to C# where am new to CPP , so guys please help me out what this below code exactly mean . int myFunc (int a, int b)=0; Thanks for your time .

Member Avatar for sepp2k
0
133
Member Avatar for nathan.pavlovsky

Hello programmers! I am having a function that has the user enter a name for an object, check if its valid, and return it if it is. I am getting the input via getline, but it seems that you have to press enter twice to make the input work. Here's …

Member Avatar for nathan.pavlovsky
0
2K
Member Avatar for jlieu.ww

Design a C++ program by considering the following conditions; 1. User must keyed-in “start” to start the program and “stop” to end the program. . 2. If the user keyed-in “choice1”, print out PATTERN A. 3. If the user keyed-in “choice2”, print out PATTERN B. Use if else statement, while …

Member Avatar for NathanOliver
0
220
Member Avatar for newbiewwcode

Hi All, Private data in a class can only be accessed by getter functions. If I have a class as the private data in another class, in another class...Example: class Top { private: class Middle { private: class Bottom { private: int number; } } } If I want to …

Member Avatar for NathanOliver
0
134
Member Avatar for makan007

I want count the elements in a srand generated array. The array is char array. Can anyone advise me on my void countElements (char* a, int size) function as it don't work? TIA. [CODE] #include <iostream> #include <ctime> #include <cstring> #include <cstdlib> using namespace std; const int MAX = 10; …

Member Avatar for TalhaMoazSarwar
0
888
Member Avatar for Masood_786

Hi All, I have demodulated two AM files (I/Q) succesfully but for one of the I/Q files which was Gnuradio (USRP) file i had to scale down I and Q components before demodulation by multiplying by 0.0001 (experimental value) to get the value that can be demodulated and heard on …

Member Avatar for rubberman
0
306
Member Avatar for Shakeylfc

Hi, Basically im looking to create a basic C# compiler or parser if you like that will allow users to create simple programs that can declare variables, assign variable values etc. Ive began with the main functionality within the application, this being the parser which shall pass in user code …

Member Avatar for arronlee
0
318
Member Avatar for masonketcham

This is my first time working with C++ and I have put together this program and came up with two errors and I am unsure what it is wanting me to do. The errors I got are: 1>c:\users\owner\documents\visual studio 2010\projects\week5\week5\passing_by_value.cpp(30): error C2064: term does not evaluate to a function taking …

Member Avatar for Ancient Dragon
0
213
Member Avatar for jayesh.babu.140

I want to add one of the column in a database table as components in a combobox. How to do it? I am using visual studio 2012 and c#. Help me please. Thank you in advance.

Member Avatar for arunkumars
0
159
Member Avatar for dkoohmarey

My client and server below can be run in seperate terminals an can see each others connections, but always send only 0 bytes. Cannot figure out why. Both scripts are g++ compilable so you can see what I mean. Run ./server in one terminal and ./client 127.0.0.1 test in the …

0
154
Member Avatar for yaldoo

Okay, so I was given this problem for my assignment, and I was wondering if I have completed the tasks the question asks. I would also like to know how I can improve this code as well. Please nothing too fancy as I have just learned arrays. Question: Write a …

Member Avatar for NathanOliver
0
2K
Member Avatar for berrychims

Design and develop a school timetable application for a school of your choice.The application should work with a database that has information on teachers,classes, subjects and departments in the school.The application should generate a teaching timetable in a well structured format. There should be a title line with year and …

Member Avatar for pritaeas
0
126
Member Avatar for newbiewwcode

Hi, I am trying to design a vector within a vector within a vector. For example, a school has 3 floors, each floor has 5 classrooms, each classroom has 20 students, each student has a last name and a first name. I know how to create a vector for floors …

Member Avatar for tinstaafl
0
699
Member Avatar for tanatos.daniel

I have this simple program in which I want to concatenate two char pointers using memcpy, but I get access violation writing location on the memcpy line. Why is this happening and what could be done to make it work? Thanks. char *first = new char[20], *second="world!"; printf("first: "); scanf("%s",&first); …

Member Avatar for Ancient Dragon
0
548
Member Avatar for redalert8
Member Avatar for DeanMSands3
0
525
Member Avatar for nathan.pavlovsky

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 …

Member Avatar for nathan.pavlovsky
0
20K
Member Avatar for Andy90

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 …

Member Avatar for NathanOliver
0
223
Member Avatar for Sanka A
Member Avatar for nelsonfaboan.rios

I've generated an application that uses images, the wheel of the mouse, a txt to obtain info and other things. On my computer and on others it runs flawlessly, but on other computers it runs different, the mouse doesn't work, it throws runtime errors, doesn't load any information from the …

Member Avatar for nelsonfaboan.rios
0
358
Member Avatar for Saboor880

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 …

Member Avatar for tapananand
-1
396
Member Avatar for Saboor880

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 …

Member Avatar for David W
0
229
Member Avatar for yaldoo

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 …

Member Avatar for yaldoo
0
6K
Member Avatar for KArisma04

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 %`

Member Avatar for Learner010
-1
217
Member Avatar for gu mi nam

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); …

Member Avatar for David W
0
297
Member Avatar for beeho

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.

Member Avatar for Hiroshe
0
367
Member Avatar for ravi_14

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

Member Avatar for David W
0
209
Member Avatar for masonketcham

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 …

Member Avatar for masonketcham
0
334
Member Avatar for yogesh_6

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

Member Avatar for AndrisP
0
133
Member Avatar for mattybennett

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 …

Member Avatar for joel.queiroz
0
2K
Member Avatar for ravi_14

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

Member Avatar for L7Sqr
0
207
Member Avatar for lehmber

trapezium pattern points for interger n plz let me knw if any body knw the program in cpp

Member Avatar for ddanbe
0
43
Member Avatar for myk45

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 …

Member Avatar for myk45
0
426
Member Avatar for Sifiso21031085

a method on how to return a boolean using lambda and its conditioned by two parameters

Member Avatar for ddanbe
0
125
Member Avatar for صمتي
Member Avatar for Hiroshe
0
217
Member Avatar for صمتي

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 …

0
160
Member Avatar for Mr.UNOwen

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 …

Member Avatar for Jean_4
0
358
Member Avatar for jonel.sumang

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 …

Member Avatar for Learner010
0
293
Member Avatar for vishnu balan

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 …

Member Avatar for tapananand
0
452
Member Avatar for Olyboy16

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};

Member Avatar for Olyboy16
0
100
Member Avatar for shubham.tanwar.39982

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

Member Avatar for jwenting
0
238
Member Avatar for m.a.u.

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 …

Member Avatar for NathanOliver
0
217
Member Avatar for ABELLOVE

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

Member Avatar for NathanOliver
-2
126
Member Avatar for ravi_14

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

Member Avatar for Suzie999
0
141
Member Avatar for Learner010

# 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] …

Member Avatar for Learner010
5
700
Member Avatar for johncrud

Hello world! I am requiring some assistance with my C# program, where I am getting an error message for having a form where the user would enter in text into a text box. I am trying to detect if the user has pressed the Enter key, and on doing so …

Member Avatar for vaynenick
0
2K
Member Avatar for BogdanCov

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

Member Avatar for tapananand
0
234
Member Avatar for Curious Gorge

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 …

Member Avatar for Curious Gorge
0
311
Member Avatar for Daneos

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 …

Member Avatar for Ancient Dragon
0
164
Member Avatar for hema.adel3

iam need to complete this game with ( jumping function - hero - enemy - the fire of enemy ) please ... iam really need your help ‪#‎include‬<iostream> #include <conio.h> using namespace std; void Disp(char X[][80]) { system("cls"); for (int r=0; r<24; r++) { for (int c=0; c<80; c++) { …

Member Avatar for David W
0
4K
Member Avatar for whitebloodcell

I am trying to create a tennis tournament simulator. There are 128 players in the tournament, and 32 seeds. I have a vector filled with 'Player' objects named 'Players'. Each 'Player' object has three member variables, Strength, Ranking, and ATPPoints. When the vector 'Players' is first declared, the default constructor …

Member Avatar for David W
0
278

The End.