19,876 Topics

Member Avatar for
Member Avatar for xela_1

I am new in c programing.In apps they usualy have images as background take for example a question and answer app will have a colourful backgroung.If i draw an image with corel draw how can i display as background in my c program.

Member Avatar for HiHe
0
227
Member Avatar for vineeshvs

is there any alternative for wavread (in matlab) in c. i want to get the samples, sampling frequency and bits per sample???

Member Avatar for NantKKNyein
0
9K
Member Avatar for nuller

and my code to write into a file is ofstream file; file.open("CustomerFile.txt",ios::app); file.write((char *) & customer,sizeof Customer); file.close(); file.open("AccountFile.txt",ios::app); file.write((char *)& account,sizeof Account); file.close(); can someone figure out my mistakes. Thanks in advance

Member Avatar for NathanOliver
0
85
Member Avatar for kamaki

hello, I'm new to c and i need to put the following string from a file into a linked list : music;artist;1,2,3,4;2015 i also need to put "1,2,3,4" in an array but only the numbers. I would really appreciate your help. Thank you

Member Avatar for 111100/11000
0
242
Member Avatar for juliocesar.schincariolfilho

I'm trying to load a png to my button, but it's not showing the png in my button. I create my button with this function: HWND MyControls::CreateButton(LPCTSTR text, int x, int y, int w, int h, HMENU id, HWND hwnd, HINSTANCE hInst, bool png){ if (png){ return CreateWindow("BUTTON", text, BS_BITMAP …

Member Avatar for triumphost
0
2K
Member Avatar for nuller

fstream file; file.open("PasswordGenFile.dat",ios::out); In writing into a .dat file what does the following line mean? file.write((char *) this, sizeof(PasswordGenerator)); And how can i convert this bit of code if i want to write it into a .txt file?

Member Avatar for Duoas
0
497
Member Avatar for lewashby

In the following program it says that there is a conflict between my getline and the getline in stdio.h. I understand what it's saying because stdio.h has it's own getline function. What's confusing me is that this is the program that my programming book (The C Programming Language) is giving …

Member Avatar for deceptikon
0
180
Member Avatar for mikeandike22

If you are a programmer than you probably know or at least know of C++ well now a company called Digital Mars is developing the D programming lanugage. [I] "D is a systems programming language. Its focus is on combining the power and high performance of C and C++ with …

Member Avatar for The Old Man
1
476
Member Avatar for nuller

i need to make a c++ console based program for a banking system using files. i implemented some code but having difficulty with withdrawing money from the account, checking balance, transferring funds and viewing transaction. For withdrawing funds i implemented the following code but it doesn't seem to work properly. …

Member Avatar for tinstaafl
0
278
Member Avatar for 111100/11000

//compiled with cmd command:gcc main.c -std=c11 -o main.exe //this is only file #include <stdio.h> #include <stdlib.h> #include <windows.h> #include <string.h> //user changeable variables int boardSize = 9;//board hight and width are of equal size #define NUMBER_OF_GRID_CHOICES 7//this has to be an odd number(increase it by two if you add another …

0
209
Member Avatar for Erma_2

How to solve this problem? I'm getting tired thinking abou this. Help me. Write a C++ program to help the master reporter of a traffic centre to analyse the amount of traffic coming from all the different entry points to a city. The amount of traffic for each entry point …

Member Avatar for gusano79
0
190
Member Avatar for Fil_1

I've been having a hard time for quite a while now trying to read files. These files include English text, pictures music and so on. After hurting in the jungles of Africa or the internet I found something that worked. `string str((istreambuf_iterator<char>(fileIn)), istreambuf_iterator<char>());` This made it possible to do all …

Member Avatar for NathanOliver
0
936
Member Avatar for anurag_pareek

it is a simple program but the beuty lies in its shortness it is written in least line as possible By :- Anurag Pareek

Member Avatar for Indra_1
0
236
Member Avatar for maenzaid

i have programe in c but i need to use function and i have no idea how do it can any one help me please and one more thing i cant use loop inside case so it must be out #include<stdio.h> #include<stdlib.h> int main() { int row ,n,c,temp,k,count=1; int input …

Member Avatar for Labdabeta
0
336
Member Avatar for murali2489

Hi All, I am very new to C Programming. I am writing a C Program to run in an UNIX machine which is used to Archive Log files if it exceeds a particular Size. The thing is the program has to get the details of the file like file name, …

Member Avatar for murali2489
0
271
Member Avatar for CodyOebel

Can someone please tell me why when I check one of my boxes, and click the button I get no message box in accordance to which checkbox I checked. #include <windows.h> #include <dos.h> #include <stdlib.h> #include <fstream> using namespace std; #define IDC_MAIN_BUTTON 101 // Button identifier #define IDC_MAIN_EDIT 102 // …

Member Avatar for CodyOebel
0
1K
Member Avatar for Amit_25

hii I have a list having m1 m2 m3........ m922 and in each there are a1 a2 a3 a4 are there like m1=a1 a2 a3 a4 a5 a6 m2=a1 a2 a3 a4 a5 a6 m3=a1 a3 a5 a7 a8 a2 etc and i want this as m1=a1 a2 a3 a4 …

Member Avatar for Labdabeta
-2
166
Member Avatar for Labdabeta

Hello, I posted on this forum two times before about a particular pair of non-printing characters being inserted into my code. You can find the threads [here](https://www.daniweb.com/software-development/threads/441611/stray-non-printing-characters-in-my-programs) and [here](https://www.daniweb.com/software-development/cpp/threads/450296/arbitrarily-appearing-non-printing-character). Two great posters tried their best to solve this problem (mike_2000_17 and deceptikon) to no avail. Finally, using the hints that …

0
157
Member Avatar for veselin.lalov.3

I want to get the occurence of the symbol ';' for each line of this C program. I type the name of the file Source.c and try to count the occuring symbol, but i am getting the value for ALL of the ';' for each line. #include <stdio.h> #include <stdlib.h> …

Member Avatar for Labdabeta
0
160
Member Avatar for Vahid_1

Hi, This two parts of code both are intended to do one thing. get two numbers from user, calculate sum between them. print it. now only the first code is working properly. second one is faulty. but why? what's the problem? code no1: #include <stdio.h> int main() { int n, …

Member Avatar for jnneson
0
91
Member Avatar for huevietnamese

In my opinion, that code is not true. because of in the 15 line. I assume that, when a==i --> a%i==0 --> break; --> line 16 will be never executed! please make me clearly !

Member Avatar for deceptikon
-2
55
Member Avatar for Taufique111

Hello Everyone. I'm basically new to c# database project so any can give me code as to pass a data value from one datagrid table to other form with another data grid view table . also i wanted to know as how to get specific value of a row when …

Member Avatar for Taufique111
0
116
Member Avatar for Weejin

Sample output: Please enter a number(Less than 8 digits): 1203021 how can I sure only 8 digits key in and how to count the zero inside the given number. Please teach me final is coming :(

Member Avatar for Maritimo
0
83
Member Avatar for Adami

Hi, I wrote the following program: #include <stdio.h> #include <stdlib.h> #define TRUE = 1; #define FALSE = 0; static int *arr; static int size=0; void createSet() { arr= (int *)malloc(sizeof(int)); size=0; }/*createSet function*/ void putInSet(int num) { int *temp; size++; temp=(int *)realloc(arr,size*sizeof(int)); if(temp!=NULL) { arr=temp; } else { printf("Insufficient amount …

Member Avatar for Maritimo
0
1K
Member Avatar for Farid_1

please help!!!!! I wrote this program to calculate addtition and subtraction of two large numbers (maximum 100 digit) it won't work for minus numbers :( i know it have problems but i couldn't fix them,please help me for fixing this :) #include <stdio.h> #include <stdlib.h> int main() { int i,d=0,la,lb,max,ia,ib,ix,iy; …

Member Avatar for Farid_1
0
213
Member Avatar for chrisjordinsky

Hello friends, I am trying to work on a project that dynamically allocates memory when needed for a string array. I just keep getting memory faults when reallocating memory but can't find any thourough tutorials on realloc besides the man page. So basically, I malloc 201 character spaces in an …

Member Avatar for chrisjordinsky
0
189
Member Avatar for lucyfersdaddy

Hi, I am a newby and am surprised I made it this far. My program is a TicTacToe program. I am having troubles with checking the validity of each move. I have tried multiple things, but could not figure it out. If someone could help point me in the right …

Member Avatar for lucyfersdaddy
0
914
Member Avatar for monaya.ash

hey , i'm having a problem with a LINK error i keep getting the same error although deleted the line with the flushall_ also i copyed the code in a new project but it still gives me the same error the error : Error 1 error LNK2019: unresolved external symbol …

Member Avatar for rubberman
0
238
Member Avatar for royalboy
Member Avatar for TAIMOOR_3
-1
268
Member Avatar for COKEDUDE

This program goes against everything I have been taught and learned in C. How does this compile? Why does this not need to be int main? Why no return 0? Don't you need an initial declaration of sub() above main? That bugs the crap out of me. I like keeping …

Member Avatar for vegaseat
0
194
Member Avatar for nhrnjic6_1

Hi. am starting out with network programming and unix network programming book. all its trying to do is connect to server and read time, but when i run it it says : 'connect error: Connection refused' Here's the code : #include "unp.h" int main(int argc, char **argv) { int sockfd, …

Member Avatar for rubberman
0
126
Member Avatar for bostjanv

Hello, Can someone, please, comment on the following curious fact that I encountered in C (actually, I use gcc, which has the default language Gnu C): If one writes const int a=10; const int b=a; one gets an error indication at the declaration of b (not constant!). I would be …

Member Avatar for bostjanv
0
114
Member Avatar for maybnxtseasn

[CODE]//--------------------------------------------------------------------------- #include <windows.h> #include <CommCtrl.h> // needed for adding custom toolbar #include "resource.h" #pragma hdrstop //--------------------------------------------------------------------------- //--------------------------------------------------------------------------- LPCTSTR ClsName = L"FundApp"; //LPCTSTR WndName = L"Resources Fundamentals"; const int NUMBUTTONS = 3; TCHAR AppCaption[40]; LRESULT CALLBACK WndProcedure(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam); //--------------------------------------------------------------------------- INT WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, …

Member Avatar for alfgaar
0
877
Member Avatar for Himanshu Chawla

**Construct a binary tree using the following pre - order and in - order trasversals : Pre-order:ABGHMCDEF In-order:BHMGADFEC ** I Just Need a Diagram of Binary Tree . I have tried a lot with youtube tutorials but not getting the answer plz help.

Member Avatar for deceptikon
0
295
Member Avatar for shanmukharao
Member Avatar for PornimaKolte
Member Avatar for necrovore
0
93
Member Avatar for akuma_reen

hi i'm having trouble in sorting the text file in inorder traversal can anyone help me out? code: #include <stdio.h> #include <conio.h> #include <stdlib.h> #include <unistd.h> #include <string.h> struct TreeNode; typedef struct TreeNode *node; typedef char ElementType; struct TreeNode{ char element; node left, right; } *root; node insert(ElementType x,node t){ …

Member Avatar for akuma_reen
0
118
Member Avatar for cambalinho

i did 1 code for give me the menu position. but i'm getting problems compare the LPSTR or LPCSTR with string :( int GetMenuPosition(HMENU menu, string caption) { int i=0; for(i=0; i<GetMenuItemCount(menu)-1;i++) { MENUITEMINFO s= {0}; s.cbSize=sizeof(MENUITEMINFO ); s.fMask=MIIM_STRING; s.cch=strlen(strCaption.c_str()); //s.dwTypeData=(LPSTR)strCaption.c_str(); GetMenuItemInfo (menu,i, true, &s); string b=static_cast<char*>(s.dwTypeData); if(b==caption) break; } …

Member Avatar for cambalinho
0
866
Member Avatar for ajabbar92

I want start on driver development, but I am not getting any beginer tutorial or book, where I can some sample app. If any body have any good resource kindly share.. Thanks in advance.

Member Avatar for ajabbar92
0
56
Member Avatar for MasterHacker110

I am working on a little project of mine. Nothing major, just messing around with encryption etc... I have problem thoug. My methods do not change the values of my data. Meaning that the pointer that I pass to hold my encrypted data, doesn't get the data assigned to its …

Member Avatar for MasterHacker110
0
179
Member Avatar for KushMishra

Hello All, I am just a newbie trying to explore areas into game developement using .Net (may be XNA studio) though I am not familier with the same. Could you please suggest some tutorials, ebooks for this so that I can start as a beginner and then later on, may …

Member Avatar for janissantony
0
255
Member Avatar for zahra123

hi i'm writting a program by lex and yacc. i want to add some invariants in some special of an input file. my expected output is the same input file while some invaraints are place through statements.how can i do it? i can transfor the input file to output in …

Member Avatar for zahra123
0
526
Member Avatar for abuamidat
Member Avatar for raliot

I need a help , to make this code to sort data from text file.Any help is appreciated! file: 50 72 10 30 90 4 23 #include<iostream> #include<conio.h> void mergesort(int[],int,int); void merge(int[],int,int,int); void main() { int a[20],p,q,r,i,n; cout<<"Enter the number of elements"; cin>>n; p=0; r=n-1; cout<<"Enter the array"; for(i=0;i<n;i++) { …

Member Avatar for Maritimo
0
331
Member Avatar for akuma_reen

hello i had trouble in finding out whats wrong with my code I want to sort the data's from my text file and it somehow did but some of the words did not appear. word.txt hello apple hi banana mango the output I get is : hello hello hi hi …

Member Avatar for akuma_reen
0
2K
Member Avatar for MasterHacker110

I recently read about the Ackerman Function and thought I would do my own implementation of it: #include <stdio.h> long long int ackermann(long long int m, long long int n) { if (m == 0) return n + 1; if (n == 0) return ackermann(m - 1, 1); return ackermann(m …

Member Avatar for Moschops
0
268
Member Avatar for Adami

I'm trying to code a program that categorized a series to be one of the following for example: 1. "demo" ; "abc" - are both hard ascending series. 2. "aabc" ; "aa" ; "zz" - are an ascending series. 3. "zzabcd" - is a non-ordered series. I wrote the following: …

Member Avatar for L7Sqr
0
162
Member Avatar for justinlake888

hello... I am trying to convert 2 digit numbers to words: example 11= eleven. I saw some other entries on this but they dont include case or switch so far I have: [code=cplusplus] #include <iostream> using namespace std; cout<<"Enter a two-digit number: "; cin>>number; if(number>99) { cout<<"Number out of range"; …

Member Avatar for hermel
0
2K
Member Avatar for raliot

I'm trying to sort a deck with merge sort.I have all my code working except merge sort function . Any help would be really helpful ;) int temp; int br = 1; void push_l(int n); void push_r(int n); int pop_l(int &n); int pop_r(int &n); struct elem { int key; elem …

Member Avatar for raliot
0
294
Member Avatar for fanabanana

hi i am tryin to create an academic schedule were i would enter some data to create it. The algorithm has to have a basic structure were i can put the names of the proffesor, the names of the subjects and some other information. If you can tell me how …

Member Avatar for rubberman
0
164

The End.