19,876 Topics

Member Avatar for
Member Avatar for ansar.tiwana.15

All A template function must have at least ---------- generic data type 1Zero 2one 3two 4 three witch is answer is correct?

Member Avatar for vijaykhatri
0
85
Member Avatar for JOHN-shirley

please help !! I cant comiple this code for a spell checker when i build the project i get no de-bugg messages however when i run the code it i get actual answer.exe has stopped working i have attached the relevent files except the word.txt is missing as it wouldnt …

Member Avatar for Moschops
0
82
Member Avatar for getmeusername

Hi All, I am trying to send data from client to server. And getting data back to client. But I am facing following issue. 1. I am unable to display client message in server side. 2. I am unable to get back message from server. Also I am not getting …

Member Avatar for Himadri_1
0
281
Member Avatar for rana ranjit

main() { char str[30]; int i ,n=0; printf("enter stirng"); while(( str[n]= getche() ) !='\r') n++; str[n]='\0'; for(i=0;i<n;i++) putchar(str[i]); } this is a simple program. enter string as input and same string become output. nothing is wrong in this program. this program is in my book. my question is what is …

Member Avatar for Daisy_1
0
84
Member Avatar for Vandithar

Hi, I want to install turbo c in windows. I don't have cd to install turbo c. I tried downloading a zip package and installing but it is giving error. How can i install and download turbo c in windows? Any suggestions? VANDITHA

Member Avatar for maha harshini
0
410
Member Avatar for mahrukhbalouch

when m pressing printf("welcome to airline reservation system\n"); its gettng error tt its a declaration syntax error plx help me i have to complete my project

Member Avatar for ddanbe
0
84
Member Avatar for narmadhahearty

while storing the value 1.111 in a float variable the value stored and printed is 1.1109999. why is this loss of data or sometimes the gain of data?.

Member Avatar for jnneson
0
122
Member Avatar for yuimikazuki

#include<stdio.h> int main(int argc, char *argv[]) { char *states[] = { "California", "Oregon", "Washington", "Texas" }; printf("size of states: %d",sizeof(states)); return 0; } the result of this is: size of states: 16 why is that?I know that an int is 4 bytes,while a char is 1 byte.I got confused why …

Member Avatar for sepp2k
0
131
Member Avatar for yapkm01

I know that there's no solution book for C++ Primer 5th Edition by Stanley Lipmann but is there any on the web? Would appreciate any help on this. Thanks.

Member Avatar for deceptikon
0
74
Member Avatar for EarhawkPH

I've been dealing with this problem for about 2 days now. Write a program that accepts the price of an item and displays the discounted price. Accept also the amount given by the customer (assume the amount is greater than or equal to the discounted price) and display the change. …

Member Avatar for Hiroshe
0
252
Member Avatar for supermastereu

Read the age and weight of 5 people. Calculate the sum of the ages of people over 70 Kg #include <stdio.h> int i, age, weight, sum; main() { for( i=0; i<5; i++) { printf("Age: "); scanf("%d",&age); printf("weight (ex: 92.5): "); scanf("%d",&weight); if(weight>70) sum=sum+age; } printf("\age sum: %d", sum); return(0); }

Member Avatar for Learner010
0
363
Member Avatar for xcenax
Member Avatar for ashu_avni

I am using below regex to find urls in paragraph.I have to make url as sysetem local path,Network folder path,web urls. Its not working in some cases.I need help to make generic regex which test urls in paragraph as my requirement. @"(?:(/>/>/>(http:\/\/www\.)|(www\.)|(http:\/\/)|(https:\/\/)|(https:\/\/www\.)|((ftp|gopher|telnet|file|notes|ms-help):(/>/>/>//)))+[\w\d:#@%/;$()~_?\+-=\\\&]*)|(?:(/>/>/>\\\\)|[file\:|[\w]\:|[\\w])(\\[a-z_\ \-\s0-9\.]||///+)+(.*)? Url Samples: \\Test-2\Users\IT Administrator \\Test-2\Users\IT Administrator is …

0
141
Member Avatar for muhammadse03503

How do i make a validating of only number and make characters invalid if entered. Using this method #include<stdio.h> #include<string.h> #include<conio.h> #include<math.h> #include<stdlib.h> #include<ctype.h> int main() { int arr [100],el,number ; // for(int i=0;i<100;++i) //scanf("%d",arr[i]); while( el == 0 ) { printf("Enter a number between 1 to 100"); scanf("%d", &number …

Member Avatar for L7Sqr
0
124
Member Avatar for ClaudeRhay

Say I have this definition: #define SIZE 2000 typedef enum { TRUE, FALSE }Boolean; typedef struct{ char jobTitle[30]; char jobDesc[255]; char jobLoc[255]; float salaryMin; float salaryMax; Boolean isAvailable; }jobInfo; typedef struct cursorNode{ jobInfo jobRec; int next; }HeapSpace[SIZE]; typedef struct hnode{ HeapSpace heap; int Avail; }*VHeap; typedef int List; typedef struct{ …

0
194
Member Avatar for ricciola

I have a problem. I have a function that search a string in a text file. This function return an int: 0 if the string I must be search isn't in the file, 1 otherwise. The problem is: if the searching string is "input1" and in the file there is …

Member Avatar for shentong
0
3K
Member Avatar for redalert8
Member Avatar for arunkumars
0
89
Member Avatar for Nima_1

Write a code snippet to declare and accept an integer and calculate the cube value of the integer. The integer should be passed by reference to a function cube(). The function would calculate the result of cubing the integer. The function prototype to be used is: void cube (int *p); …

Member Avatar for Daisy_1
0
249
Member Avatar for iConqueror

I know that the main difference between an array and a list is that a list size changes dynamically as items are added or removed. Because of this, if we copy an array to a list does that mean that the list must have a static size of the array's …

Member Avatar for deceptikon
0
181
Member Avatar for finders

**Program:** #include <stdio.h> int main(){ int array[5] = { 0,1,2,3,4} ; int * p1, **p2 ; int * parray[2] = { NULL , NULL }; p1= & array[2] ; *p1 = 20 ; p2 = & p1 ; ** p2 = 30 ; parray[0] = & array[0]; parray[1] = & …

Member Avatar for L7Sqr
0
94
Member Avatar for Thundermax

Hello guys, okay? I have a problem and I wonder if anyone can help me. Well, as the title of the topic says, the problem is about the C language, and more specifically on GUI. I made a C program it is working and everything is ok. But the problem …

Member Avatar for Hiroshe
0
228
Member Avatar for Alxprog

Hi! Have anybody seen Scot Meyers' video on Universal references? In order for a reference to be "universal" two requirements should be fulfilled : 1)variable should have double ampersand after it's type : sometype&& 2) the type should be deduced . The second point is somewhat confusing to me: despite …

Member Avatar for mike_2000_17
0
328
Member Avatar for Daneos

Hello, I need for my game inventory function a mysql query which checks the next available free slot id. example: I have item on slot 1, 2, 3 and 5. Slot 4,6,7,8,9 ... are free.. Now I need query which would get the number 4. Something like SELECT * FROM …

Member Avatar for NathanOliver
0
351
Member Avatar for devh

In Turbo C , I am using bios.h to send and receive data on serial Port. I am using bios(2, 0, COM1) to receive data.... and bios(1, in, COM1) to send data..where (let int in=65 I am receiveing data from Port but unable to send... I copied code from [url]http://electrosofts.com/serial/[/url] …

Member Avatar for nithinkumar
0
1K
Member Avatar for Fazelessmetal

/* Written by HAYZAM SHERIF ! USE IT HOWEVER YOU WANT :D */ #include <iostream> #include <string> using namespace std; char name[100]; wchar_t words[100]; int choice; int main() { //main string userstring; string mystring; mystring = "THIS GAME IS COOL"; cout<<"Hello Welcome to the Code Game!"<<endl; cout<<"--------------x----------------"<<endl; cout<<endl; cout<<"Please enter …

Member Avatar for deceptikon
0
171
Member Avatar for Jack_9

In my opinion, c# is better then java. Espicially because it runs upon the .NET framework. But java can run on virtually any device. They re both alot alike, so which one would be better to learn?

Member Avatar for ChrisHunter
-1
241
Member Avatar for Jack_9

Is C really a good language do have under your belt? Would it be better just to learn C++?

Member Avatar for Hiroshe
0
103
Member Avatar for Jack_9
Member Avatar for Hiroshe
0
190
Member Avatar for geekboots

[Click Here](http://www.geekboots.com/c/intro) get lot of simple c programming which will help you to learn C programming at the beginner stage.

Member Avatar for deceptikon
0
306
Member Avatar for EarhawkPH

Here's the problem: Write a program that will input values for A and B. Compare two values inputted and print which of the values is higher including the remark “Higher”. So here's what i've done so far main() { int A, B; clrscr(); printf("Input Value for A: "); scanf("&d", &A); …

Member Avatar for deceptikon
0
188
Member Avatar for nitin1

I am using C/C++. I am using geany for editing my codes. I want to use beecrypt in my programs. But ofcourse, it is not included by defualt. I have downloaded beecrypt library already but don't know how to use it with my programs. I have put my program in …

0
87
Member Avatar for nitin1

Main.cpp #include <iostream.h> #include "functions.h" int main(){ print_hello(); cout << endl; cout << "The factorial of 5 is " << factorial(5) << endl; return 0; } hello.cpp #include <iostream.h> #include "functions.h" void print_hello(){ cout << "Hello World!"; } factorial.cpp #include "functions.h" int factorial(int n){ if(n!=1){ return(n * factorial(n-1)); } else …

Member Avatar for L7Sqr
0
136
Member Avatar for oanahmed

Hi! I'm a student learning C language. During my exercise I have faced a weird problem(atleast to me). I have encountered two declarations: int size; int arr[size]; I'm unable to figure out the actual dimension of the array and its lenght as the variable `size` is only declared not defined; …

Member Avatar for oanahmed
0
351
Member Avatar for L7Sqr

Often times it is useful to instrument a program you do not have the source to in an attempt to learn more about it. This can be for debugging purposes, blackbox testing, or for providing alternate versions of common functions/libraries (to name a few). On Linux, there is a very …

2
1K
Member Avatar for archie.herbias

I want to build an own interpreter using c programming and I want to call it in command prompt. How would i do this? I just want to start a command "display" which can display the contents of a file like type in cmd.

Member Avatar for archie.herbias
0
2K
Member Avatar for Gimper

Hello everyone. I recently started using C++ and blah blah blah you know the rest. Using my extremely limited knowledge, I attempted to make a basic 4 function calculator CUI in C++. The code I wrote is as follows. [CODE]#include <iostream> #include <string> #include <sstream> using namespace std; char operator …

Member Avatar for rela
-2
3K
Member Avatar for kent.johnstone_1

Hi, What is the difference between "__inline__" and "inline"? I have programs with both. "inline" works, "__inline__" has an error "Unable to resolve identifier __inline__" thanks

Member Avatar for kent.johnstone_1
0
345
Member Avatar for Nikolas9896

Could you tell me how I can use the .docx file with Visual Studio 2013 but only with C++ code, and in my application **without** using **MS Word** or another wordprocess. Thanks. I wanna change formatting(bold italy, centre..) and text in .docx-files.

Member Avatar for NathanOliver
0
131
Member Avatar for wilhemina

I'm trying to search a text file for a string indicating the path of a folder which I will then use as a path to write a text file into. My code above successfully returns the location of the path /home/caars/speech_reg/commands/ to the pointer to find. Now I am trying …

Member Avatar for yunda
0
551
Member Avatar for rzzque

I want to Delete every occurrences of Pattern in String. But What's the problem? Please help with the following C Code. #include<stdio.h> #include<string.h> #include<stdlib.h> char* SUBSTRING(char *STRING,int POSITION,int LENGTH); main() { char STRING[100],PATTERN[90]; int X,P; printf("(Input)Enter string & pattern with space between them: "); scanf("%s%s",STRING,PATTERN); X=INDEX(STRING,PATTERN); P=strlen(PATTERN); printf("Output: %d\n",X); while(X!=0) …

Member Avatar for David W
0
309
Member Avatar for lithium112

I have been looking everywhere for an answer to this but haven't been able to find one. Would anyone happen to know how to add a button to the cell of a datagridview? Thanks in advance!

Member Avatar for lithium112
0
42
Member Avatar for bigredaltoid

Hi guys and sorry if this is the wrong forum. I am messing around with visual studio and trying to make a picturebox move around on a form when a user clicks a directional button on the form. I am able to move the picturebox any direction I want by …

Member Avatar for bigredaltoid
0
252
Member Avatar for terence193

I am trying to make a function that rounds number.. I declared the function above the main and voided it Then I recalled the function in the program and listed the variables needed in brackets and then I wrote the function I can't work out what is wrong. [ICODE]#include<stdio.h> #include<math.h> …

Member Avatar for panpwintphyu.loo
0
240
Member Avatar for bananacat

First off, I'm sorry if this is gonna be some noobish question. I need advice for managing my multiple windows application forms. I'm programming C#, aided by Visual Studio 2013. Class Program.cs This contains the main method, where everything begins, and everything ends. static class Program { /// <summary> /// …

Member Avatar for cgeier
0
391
Member Avatar for king.umair523

I am confused about pointer , it takes value of a vairable or only takes adress of vairable ??

Member Avatar for tenzinlol
0
143
Member Avatar for Stefan_2

I've just finished my programming course in college and I need some projects or ideas for 'practicing' and making sure I don't forget some part of C programming. I would love for you to either give me some ideas or point me to sites with mini project from easy to …

Member Avatar for rubberman
0
157
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 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 supermastereu

Receive a number from the keyboard and tell you if it is divisible by 10, 5, 2 or if it is not divisible by any of these. Why this dont work? #include <stdio.h> #include <stdlib.h> #include <math.h> main() { int num; printf("number: "); scanf("%d", &num); if (num % 10 == …

Member Avatar for rana ranjit
0
146
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

The End.