19,876 Topics
![]() | |
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 | |
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 … | |
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 … | |
hey can any one give me the information that from where i can get source code of messanger ( sply yahoo) thanks | |
hi does anyone know how to make a structure globle or is it already? thx, Jason | |
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 … | |
/*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(); } } | |
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[] … | |
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! | |
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 … | |
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 … | |
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 | |
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. | |
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 … | |
help me in my work .... can any one give me cods on linked stacks... coz i faced alote of proplems... thanxxxx | |
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. | |
[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]); … | |
is there a data type for a variable to handle as much as 100-digit integer? | |
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 | |
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! | |
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 … | |
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 . | |
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 … | |
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 … | |
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 … | |
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 | |
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++) { … | |
is it possible to write a program which will shutdown the remote systme in c? | |
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 … | |
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 … | |
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 | |
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 … | |
[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. … | |
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 … | |
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. | |
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. … | |
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 : … | |
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> … | |
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 … | |
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, … | |
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 | |
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 … | |
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 … | |
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 … | |
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 … | |
Exactly how do you create multi-file project and how do you compile it in C++ using Linux? | |
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 … | |
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 … | |
hey.. could someone give me some good resources on how to implement and use dialog boxes in windows applications.. | |
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 … |
The End.