15,552 Topics

Member Avatar for
Member Avatar for johans22

Got blue, red and yellow lights that each can turn ON independently of one another. Using operators, structs, etc. how to obtain the current color, if having: Red & Blue is purple, Blue and Yellow is green and Yellow & Red is Orange. This is not a homework.

Member Avatar for rubberman
0
266
Member Avatar for Ghada_1

Can someone help me please find the ploblem with this program ? I know it's a question of a misssing pointer but i don't know where to put it .. #include<stdio.h> void remplissage_matrix(char M[50][50],int l , int c); void remplissage_elements(int l, int c ,char M[50][50],char elements[100],int *n); void remplissage_histo(int histo[100],char …

Member Avatar for StuXYZ
0
236
Member Avatar for johans22

typedef struct { unsigned char Val1; unsigned char Val2; unsigned char Val3; unsigned char ValArray1[2]; unsigned char ValArray2[2]; unsigned char ValArray3[2]; unsigned char Val4; unsigned char Val5; }s1; From the above structure, would like to map only the Val3, ValArray1,ValArray2 and ValArray3 to series of bit values using ideas like …

Member Avatar for AssertNull
0
257
Member Avatar for sudip_1
Member Avatar for Linzi c++

I'm trying to make an interactive calculator to solve the volume of a sphere. The thing is that I can't seem to make the program let the user input their own number for example, What if the user wants to the number four as the radius? Here is what I …

Member Avatar for David W
0
339
Member Avatar for HenCa

I have an Archive Static Library file is called "Web Server.a". I need to recompile it with my updated .h and .c file in the same name folder "Web Server". In order to recompile it I was told that I need to use GNU. I used to use Cygwin for …

Member Avatar for rubberman
0
285
Member Avatar for Mayank_5

Hello My Turbo C/C++ 4.0 was working properly in my Windows 7 64-bit but from two days i am not be able to use keyboard in Turbo C. I can't type any text. But mouse is working. Tried with DOS BOX Turbo C3, reinstalled it many times but could not …

Member Avatar for deceptikon
0
1K
Member Avatar for pvbhargav

Hi all, I have already used InitGraph and have given the path(C:\\TC\BGI) in Initgraph and checked the Graphics option in Linker Options. Still Iam getting this error. I want a solution. Can somebody pls help me. Its urgent.

Member Avatar for Sun_5
-1
14K
Member Avatar for TĦɇ Ãðît

#include<iostream.h> #include<conio.h> class twonum { private : int x,y; public: void getvalues() { cout<<"enter any two numbers"; cin>>x>>y; } void putvalues() { cout<<"\n\n"<<x<<","<<y; } int add(int x,int y) { return(x+y); } int multiply(int x,int y) { return(x*y); } void swap(int x,int y) { int c; c=x; x=y; y=c; cout<<x<<","<<y; }; …

Member Avatar for tinstaafl
0
299
Member Avatar for V3N0M

Hi guys after fixing my previous bug this one has resulted. What I am trying to do: 1. Make getchar() read only one character per input 2. Make the while loop not accept numbers 3. When the user enters duplicate characters the program should only accept the first character. code: …

Member Avatar for V3N0M
0
321
Member Avatar for V3N0M

Hi guys I am looking to go through C then transition to C++ later this year. I am having a minor problem with switch statement and I am not in a position to ask anyone as there are no tech savvy that I know. So I thought it was better …

Member Avatar for V3N0M
0
337
Member Avatar for Jose_12

I need save each word of text file into array of strings I have this code how to do for convert into dinamically #include <stdio.h> #include <conio.h> #define MAX_CHARS 20 typedef char string[MAX_CHARS+1]; // leave one space for '\0' main(){ int i; string array[4]; FILE *data; data = fopen("ard.txt","r"); for(i …

Member Avatar for AssertNull
0
690
Member Avatar for Jose_12

#include <ctype.h> #include <stdlib.h> #include <stdio.h> #include <string.h> char c; { char text[1000]; FILE *fp=fopen("filename", "r"); int i=0; while((c=fgetc(c))!=EOF) { do something } }

Member Avatar for deceptikon
0
176
Member Avatar for Jose_12

How should I concatenate the characters read from a file with fgetc to determine if it is a number, keyword or an identifier? The problem is that, for example, the number 555 must be one and 5 and 5 and 5 as words must be jose and not character by …

Member Avatar for Jose_12
0
515
Member Avatar for Jose_12

I have this code #include <stdio.h> #include "ctype.h" #include <string.h> #include <stdlib.h> #include <string.h> char p; int j; int i; FILE *f1; char c; int main() { f1 = fopen("ard.txt","r"); if(f1 == NULL) { printf("No se ha podido abrir el archivo"); } while((c=fgetc(f1))!=EOF) { if (isdigit(c)) { putchar(c); } else …

Member Avatar for AssertNull
0
289
Member Avatar for can-mohan

Hi, I need to make sure my integer variable doesn't store more than 2 bytes. Usually i am writing programme on Linux machine where integer size is 4 byte. Each byte can take the values 0 through 255 (=2^8-1). So, two bytes can take the values 255*255=65535, so would it …

Member Avatar for AssertNull
0
470
Member Avatar for Hi-Tone

Hi all, I trying to add two matrices together using a typedef struct, but i seems to get an error doing this. I asked my professor, but he couldnt help me. Is there anyone who might know why this problem is caused? Thank you so much! Code: /* Structures */ …

Member Avatar for Akbar_5
0
3K
Member Avatar for Alif_2

Here is my text file : > 1 SPRITZER 999 2.500000 > 2 PENCILBOX 999 20.000000 > 3 IPHONE 90 20.000000 > 10 GUNNAROPTIK 1919 200.000000 The program let the user enter productID. Listed as 1,2,3,4. And delete the whole line. I'm currently testing it in main function only. And …

Member Avatar for AssertNull
0
263
Member Avatar for Mr.M

Hi Dw. If there is anyone who knows how and which languagies are used to develop software's like word processing, Excel, Access, basically things like Office suite. I know Linux has their own different tools for office, as well as Microsoft as well and other OS have different Suites for …

Member Avatar for rubberman
0
193
Member Avatar for rakesh.menon.16

hello, I've been trying to interface 4x4 hex keypad with pic16f877a using MPLAB X and XC8 compiler. My task is to get 4 individual key presses from matrix keypad and convert it into a 4 digit integer and display the 4 digit integer on multiplexed common cathode seven segment display …

Member Avatar for AssertNull
0
313
Member Avatar for Chris_38

Can someone give me some programming ideas to keep my knowledge up-to-date? I received a masters degree in computer science back in December and been job searching since then. I want to tell an employer something.

Member Avatar for rproffitt
0
287
Member Avatar for Kersten

Hello ,I'm writing a GUI with C Win32 API and facing following issue. When I start the program and click the button for Opening the file dialog everything works fine. I can choose a file and all informations seem to fit properly into the ofn structure. If I choose to …

Member Avatar for Kersten
0
556
Member Avatar for Kersten

Hello, this question is related to an older post of mine ([Click Here](https://www.daniweb.com/programming/software-development/threads/505499/getopenfilename-freezes-at-second-execution)). In this question i stated that my program freezes at the execution of GetOpenFileName. After struggeling a while with that problem and doing other more important stuff first, i came back to the original problem and found …

0
218
Member Avatar for will_9

hi, guys i'm in colleage trying to do some homework with cs10 and got stuck with this combination of functions please help me out!!!! T^T spent 8hours today still couldn't figure it out #include<iostream> using namespace std; void getProbsPerSet(); void doOneset(char Func); void doOneproblem(int &Answer); void getMaxnumber(int &MAX); void printHeader(int …

Member Avatar for rubberman
0
403
Member Avatar for Ani_2

Hello guys, I had been writing program in Turbo C 7. For few days programs were working correctly but today I am getting different output.I tried doing simple program finding perfect number or not.But I get this output for perfect numbers as : "1308 is perfect number" and for non-perfect …

Member Avatar for pritaeas
0
119
Member Avatar for Micheal_6

How can I make the URL displayed in the MessageBox clickable, such that when a user clicks on it, it will open the link in a web browser? string msg = "MyApp | v1.0.0.0.1" + Environment.NewLine + "© 2016 MyApp" + Environment.NewLine + "All Rights Reserved." + Environment.NewLine + "For …

Member Avatar for tinstaafl
0
3K
Member Avatar for nitin1

Hi, I have one function (in a library I can't change the code) which takes a key and returns a Object. This code is written in java. I am calling this function from cpp code. I am accepting the result as jobject. 1. Added key as "key1" & value as …

Member Avatar for JamesCherrill
0
2K
Member Avatar for burningkrome

I'm a developer lead and I'm trying to get actual statistics on how many developers are comfortable in multiple C-like languages. I'm specifically interested in the crossover amongst C, C#, C++, and Objective-C. This is a legitimate quesiton, not a spam. Instead of asking everyone to post a comment...I've created …

Member Avatar for rproffitt
0
236
Member Avatar for _1_13

We wish to write a program countletter.cpp that takes a filename and a single character on the command line and prints the number of occurrences of that character in the file

Member Avatar for rproffitt
0
96
Member Avatar for nivedita5

I am working with a code which stores the information of customers in a file called customer_details.txt then asks the user to enter a name and then searches for the name in customer_details.txt, if the name is found, the entire details of the user is displayed on the output screen. …

Member Avatar for 2teez
0
3K

The End.