19,876 Topics

Member Avatar for
Member Avatar for Mahen

Suppose i have a main.cpp file and a test.h file: /////////////////////////////////////////// //main.cpp #include <iostream.h> #include <string.h> void test(); char foo[200]; int main() { strcpy(foo, "testing"); test(); return 0; } ////////////////////////////////////////////////////////////// //test.h void test() { cout << mir << endl; } WHY IS "mir" AN UNDECLARED IDENTIFIER

Member Avatar for freemind
0
171
Member Avatar for cyber_aziz

hello ppl this is my 2nd post and as i said earlier, im writing a cpp program for an exam project. the project is designing a school database system neways the problem is that the the compiler hangs and terminates whenever a wrong type of data is entered i mean …

Member Avatar for freemind
0
219
Member Avatar for cjones5499

i need to store the piglatin words returned by each function into one string so that I can then check it for lowercase or uppercase words and change as required. I can't seem to get the return 'temp' to store into a string in main. Also, when printed out, the …

Member Avatar for Stoned_coder
0
2K
Member Avatar for jindalarpan

hey can any one give me the information that from where i can get source code of messanger ( sply yahoo) thanks

Member Avatar for Paul.Esson
0
119
Member Avatar for 3265002918

hi does anyone know how to make a structure globle or is it already? thx, Jason

Member Avatar for 3265002918
0
106
Member Avatar for Jon182

Hey guys, I was using a switch statement for a menu so when the user entered a number from the menu that action was taken. The last option in the menu when pressed just said thanks for using the program then it would say press any key to continue. Although …

Member Avatar for Jon182
0
106
Member Avatar for wishes

/*intersection ........... */ void Intersection (Queue q,Queue r, Queue &s) { Q_entry x, y; Queue temp; while(!q.empty()) { q.retrieve(x); while(!r.empty()) { r.retrieve(y); if(x==y) s.append(x); r.serve(); temp.append(y); } r = temp; q.serve(); } }

Member Avatar for Rashakil Fol
0
112
Member Avatar for Judas

Im having trouble clearing the strg variable in my code, i have tryed cout<<flush(); and <<endl but each time i run the function it concatenates the new data with the old. [code] #include <fstream> #include <iostream> #include <string> using namespace std; int main() { static char str[12], strg[100]; char ismapname[] …

Member Avatar for Dave Sinkula
0
1K
Member Avatar for wu7jian

printf("%c was appended to arr\n",*(char*)p); header <stdio.h> i met a lot of this kind of situation.what are these "%d,%c"stand for? is there a detailed list about this? thank you very much!

Member Avatar for Dave Sinkula
0
142
Member Avatar for cjones5499

I need to write a program in C that reads in an english sentence and converts it into piglatin according to 3 rules. All the rules are working correctly; however, it seemes that the program only executes 2 words: the last 2 words in the sentence. Also, since I have …

Member Avatar for proghelper
0
101
Member Avatar for webempress

Can anyone help me convert char to double. Yes, I tried casting, it did not work. Anyway, this is the problem, the variable is declared as type double in the struct(database structure). However, it is defined as type Text in the class I'm modifying. The variable in the class I'm …

Member Avatar for Dave Sinkula
0
365
Member Avatar for eivnay

hi guyz Am new to Daniweb.I am Vinay Kumar,currently doing 1st year CS in india. I did an intrductory course in computing last sem.I learnt some java. Now I want to learn c seriously. Please help me by suggesting some books,online tutorials etc. Thanking you

Member Avatar for Acidburn
0
158
Member Avatar for bballmitch

How do i convert an int to a const char? also, how do i convert a string to a const char? thanks for all the help.

Member Avatar for Stoned_coder
0
154
Member Avatar for altheastronut

Hello, I've been working on this random number generator code and got it to work using integer outputs, however I need scientific notation. I read on a site that I can use %E for scientific notation, however I get wierd results that aren't really random, and results that are extremely …

Member Avatar for altheastronut
0
280
Member Avatar for wishes

help me in my work .... can any one give me cods on linked stacks... coz i faced alote of proplems... thanxxxx

Member Avatar for wishes
0
133
Member Avatar for Jon182

Hey guys, I was just wondering why when dealing with a lot of classes do you often have to use something like the following code before the class: [code] #ifndef classCarhpp #define classCarhpp [/code] and this code after the class [code] #endif [/code] Thanks in advance.

Member Avatar for winbatch
0
148
Member Avatar for wu7jian

[code]#include<stdlib.h> #include<stdio.h> #ifndef COMPARE_H #define COMPARE_H using namespace std; int compare(const void* pfirst,const void *psecond); #endif int compare(const void* pfirst,const void *psecond) { const int first=*((const int *) pfirst); const int second=*((const int *) psecond); return(first-second); } void main() { int iarr[10]={9,83,100,1,645,-7654,4,23,543,9}; int j=0; for(;j<10;j++) printf("element %d of iarr is:%d\n",j,iarr[j]); …

Member Avatar for Lerner
0
196
Member Avatar for zeek
Member Avatar for Stoned_coder
0
73
Member Avatar for thiru.y

I am not sure if this is normal but I am having problems compiling libtiff.Can anybody point me in the right direction .I have followed the instructions from here [url]http://www.cs.wisc.edu/graphics/Courses/cs-638-1999/libtiff_tutorial.htm[/url] but still the compiler is not able to identify tiffio.h . Thanks

Member Avatar for freemind
0
114
Member Avatar for alpha_foobar

Does anyone know if this is possible, and how to do it? Or if there is another way? Cygwin GCC creates PE binaries (i think), I want ELF binaries. Cheers!

Member Avatar for alpha_foobar
0
150
Member Avatar for BenPage

Hi there. I want to create a dialog, with a menu ( file, help, edit etc.), and with tabs on the dialog. Basically like the display properties dialog that you get when you right click on your windows desktop, just with a menu added. Also, I want to add dialogs …

Member Avatar for Stoned_coder
0
105
Member Avatar for aasahil

Hi I am sahil Is there any one who describe me the use of multidimentional or two dimentional arrays in "C". I need your help .

Member Avatar for indianscorpion2
0
164
Member Avatar for JoBe

Hi Narue, Ive started your tutorial on pointers and had a few questions about it if you don't mind. 1) You talked about the fact that a function has an adres itself and that you can call a function threw it's adres. This I understand, as I tried it out …

Member Avatar for Narue
0
302
Member Avatar for POW

I have been taking a few courses in C++ and I am having difficulty starting a few problems. I am seeking help to develope programs for the follwing questions: 1) Write a function to calculate the mean, variance, and standard deviation for values stored in an array. 2) Write a …

Member Avatar for Dave Sinkula
0
78
Member Avatar for trsja56

Hi all, i'm coding something similar to a 'http-server', and i'm having problems with sending files to the client (web browser) from the server. instead of the client getting a Save File download box, it just recieves all the assembly code from the file, it gets printed as html text …

Member Avatar for trsja56
0
158
Member Avatar for crazyfans86

Hi, I have to write a program in C programming to plot a sin curve using array. i would appreciate if someone could give me and give me some hints on how about to do that. thanks. :D

Member Avatar for Narue
0
123
Member Avatar for hfaucette

Does anyone know if this is possible? //in header struct Output { double *var1; double *var2; double *var3; } //in main std::vector<Output> output(512); and then be able to populate each member of the Output struct in the "output" vector? Something like: for (i = 0; i < 512; i++) { …

Member Avatar for bumsfeld
0
154
Member Avatar for wani_raj

is it possible to write a program which will shutdown the remote systme in c?

Member Avatar for Alvein
0
107
Member Avatar for zauber

Hello, for some time I have programmed in java and python, and would now like to enter the C-scene. The only problem is: I'm more or less only interested in C and not C++. And it seems quite tricky getting hold of programming tips and tutorials which apply to c …

Member Avatar for Narue
0
153
Member Avatar for zeek

i just would like to ask for help regarding my code... my problem is this... the user must enter an 80-digit number...if he enters more than 80 digits, the error "\007Input number must not exceed a total of %d digits\n" will appear setting the iserror flag to 1 and breaking …

Member Avatar for Narue
0
454
Member Avatar for kartik911

Hi, can anybody help me? i am relatively new to C Programming. My question is : How do you create a program which will take a filename as an argument, check whether the file is present and open it (if the file is not present create that file). Thanks -Kartik

Member Avatar for Narue
0
276
Member Avatar for trashed

hi. [B]question 1:[/B] i am writing a small C script to convert files to another format. in this case i need my script to use [U]all[/U] files in a directory that have extension .htm - how can i do this? the user will manually specify the directory path but then …

Member Avatar for Narue
0
128
Member Avatar for ^Simes^

[WARNING!] Long Post! [/WARNING!] I have recently got a Pocket PC phone and have managed to cobble together a DLL to display a simple text message on the Today Screen. What I really would like is the time displayed in a large font as I had on my SmartPhone 2002. …

Member Avatar for Narue
0
111
Member Avatar for winbatch

Any tips for compiling templates on visual studio .net 2003? I have code that seems to compile fine on other compilers but am getting an LNK2019 on visual studio .net 2003. I am using template specialization (Dave S. helped me with this a few weeks ago). Before I post any …

Member Avatar for winbatch
0
313
Member Avatar for raevin

Does anyone know how to fix the afxwin1.inl debug assertion error (I get it for line 22 of afxwin1.inl). Google gives me no help.

Member Avatar for Drowzee
0
113
Member Avatar for Drowzee

Do you always have to put file access in the view? I think it would be more appropriate in the document, and it works fine to implement a CFileDialog object from the document file. Considering all the parsing and data storage I've got to do, that makes sense to me. …

Member Avatar for Drowzee
0
129
Member Avatar for sanjeewa131

Hi, I'm trying to test IMF filter with my application. I need to customize it so that i try to exicute the sample program named CustomFilterSink given under SDK for spam filtering. I get the following two errors when I compile the program. C:\Program Files\Exchange SDK\SDK\Include\Seo.Idl(773) : error MIDL2011 : …

0
118
Member Avatar for truxpinoyxrl17

I need help. I need help on reading input file using .READ and normal streams. I also need help on sorting input file and passing data to the structure rec and output it without showing any null characters..... here's my confusing code... #include <iostream.h> #include <iomanip.h> #include <fstream.h> #include <string.h> …

Member Avatar for truxpinoyxrl17
0
521
Member Avatar for altheastronut

Hello all, I haven't used c++ for years and now I need it for school. I am running a fortran 77 code and I wanted to know if it is possible to write a program in c++ (That's the only language I know) that generates random numbers with decimals and …

Member Avatar for Rashakil Fol
0
228
Member Avatar for Drowzee

This is currently something in design phase, but I'd like to have the idea checked over. The situation is roughly as follows: I've got a display that can show some amount of structs with varying byte counts per struct. I've got a big binary file, over a gigabyte in size, …

Member Avatar for Drowzee
0
484
Member Avatar for webempress

Please shed some light on the procedure one must take to pull values (i.e. from database or variables with default values to a dialog. I am trying to pull values to a dialog using "strcopy(tempvariable, "Value");" but it is not working. Please help me. Nis

Member Avatar for webempress
0
121
Member Avatar for Hady

I have a C++ program (Console Application), I want to be able to access it from the Web, My problem: I don't want the program to load every time a user connects to the page (it takes toooo much time), the program should load once and forever on the server …

0
107
Member Avatar for pscha3

Hi, my question is about the fstream object. How does it work? since I was writing a program and I defined many files for the object. [U]I want to know if I can display all the files of the object at once and if so how.[/U] Thanks for understanding. This …

Member Avatar for Narue
0
137
Member Avatar for AhmedHan

I am using BloodshedDev-CPP GNU. Assembly codes are written in this format : int Variable=45; /*a random value*/ __asm(mov %ax,_Degisken); The crap compiler uses 'AT&T Assembly Syntax'. The problem is I don't know that AT&T stuff and I want to call some interrupts in my program. In the [I]normal[/I] assambly …

Member Avatar for fluidDelusions
0
1K
Member Avatar for ramow

Hi everyone, i am havinh problems linking OBJ files that uses the following: #include <stdio.h> #include <winsock2.h> #pragma comment(lib, "ws2_32") I am working on MEX matlab files. When i link them, i get the following errors: >> mex timestwomex.c C:\MATLAB6p5\sys\lcc\lib\ws2_32.lib timestwomex.obj .text: undefined reference to '_gethostbyname@4' timestwomex.obj .text: undefined reference …

Member Avatar for ramow
0
134
Member Avatar for djbsabkcb

Exactly how do you create multi-file project and how do you compile it in C++ using Linux?

Member Avatar for kc0arf
0
325
Member Avatar for davidianstyle

I have a homework assignment that I have been trying to figure out for over 12 hours now...The program I am trying to write is too complicated to post, so I created a simpler program which lets a user enter two integers and an operation to perform. If someone can …

Member Avatar for indianscorpion2
0
251
Member Avatar for Rearden

Can someone explain this to me once and for all? I keep getting different answers everywhere I look. What is the correct way to separate the class declaration from it's member functions? The way I am doing it now is that the declaration and all of the member functions are …

Member Avatar for Narue
0
209
Member Avatar for shre86

hey.. could someone give me some good resources on how to implement and use dialog boxes in windows applications..

Member Avatar for winbatch
0
127
Member Avatar for Mahen

hi there. Am working on a program that finds the binary executable of a particular program when we input its filename. For example: INPUT: cmd.exe OUTPUT: c:\windows\system32\cmd.exe Am using the following API's: FindExecutable() SearchPath() if you got any other API or any other ways to find executable progrmatically, please share …

Member Avatar for Alvein
0
224

The End.