18,490 Topics
Hello. I've just discovered that I didn't think a cunning plan all the way through. I've got a grid with a bunch of columns and rows holding CStrings. What I'm doing is trying to filter the grid to only display certain strings. The user selects a location in the grid, …
I have this program that I need to write, but I'm so lost. I have gotten some things down and think I'm on the right track, but am stuck with how to set up the array and then how to do the tabular format...everything else I have down (if that's …
I am using the win32 CreateFile and ReadFile API to read Files on my HD but it stops reading when it encounters a null termination('/0'). Could you tell me of a way to overcome this and continue to read the whole file.
Sir, I want to know why is it so that, in the Case of C Language there is no need to include stdio.h Header file. But when the same Program is saved with with .cpp extension it ask for the prototype. and we have to include the stdio.h header file. …
#include<stdio.h> int main() { float f1,f2,f; double d1,d2,d; char s1[]="2.0045",s2[]="1.00056"; f1=atof(s1); f2=atof(s2); f=f1-f2; d1=atof(s1); d2=atof(s2); d=d1-d2; printf("\n%s %s",s1,s2); printf("\n%f %f : %f",f1,f2,f); printf("\n%ld %ld : %d\n",d1,d2,d); return 1; } Output: 2.0045 1.00056 1271310336.000000 869988544.000000 : 401321792.000000 -67108864 1104343465 : 1870659584 Desired Output: 2.0045 1.00056 2.0045 1.00056 : 1.00394 2.0045 1.00056 …
Ive searched through google and most are not free, and the ones that are are being declared have a virus inside by norton as well as ewido. BTW im trying to do this because there was a PSP (playstation protable bin loader released) [URL=http://www.psp-hacks.com]website and article here[/URL]. I wanted to …
CAN ANYONE EXPLAIN THE OUTPUT OF THESE PROGRAMS: [code] /* Explain the output*/ #include<stdio.h> int main() { if(printf(5+"Good")>0) printf("morning"); return(0); } [/code] [code] /*Debuh as per i/p o/p*/ #include<stdio.h> int main() { long steps,fval,bstp,cnt1; int num,unit,box[2][13],cnt2,cnt3,cnt4; printf("Enter number:"); scanf("%d",&num); num=num<1?1:num>12?num:12; for(steps=1;cnt1=2;cnt1<=num;steps *= cnt1++); for(cnt1=1;cnt1<=steps;cnt1++) { for(cnt2=1;cnt2<=num;cnt2++) box[0][cnt2]=cnt2; for(fval=steps;bstp=cnt1;cnt2=1;cnt2<num;cnt2++) { if(bstp=0) …
Plz See [code] #include<stdio.h> #define TOTAL_ELEMENTS (sizeof(array) / sizeof(array[0])) int array[] = {23,34,12,17,204,99,16}; int main() { if(-1<= (TOTAL_ELEMENTS-2) ) printf("%s","gotcha\n"); else printf("%s","oops\n"); return 0; } [/code] why is it printing oops
From where can i find the header file unistd.h...one of my program requires it
i'm having a little trouble grasping the concept of this. If someone could help it would be great. Its part of my assignment...no i don't want u to do it for i just need help. 1. declare an ofstream foutput in main function 2. open a file in main function …
OK, I've been banging my head against a wall for a few hours. And I need some sleep. Can someone please show my how to accept input and keep count of it so I can send WriteBytes2() the address of the buffer and the number of bytes entered? Here is …
Sir, I want to multiply a 2-D array of size 100 by 100 a[100] * b[100]; or a[100][100]; What is the way to multiply the two arrays. Ashwin Perti
Hi Everyone, Is there a way to make your own remote connection program (just for my use - at least fo now)? Something like goToMyPC. Any suggestions would be appreciated. Also, is this easier to do in Java/PHP? Thanks in advanced. PS: If anybody knows of a tutorial, that would …
i want to start the image processing in c language.but i m unable to load the any image(bmp,jpg,tif etc) in c file. any one can help me? thanking you
Hello everyone out there, see the thing is that I just built my Tic Tac Toe and I want to add some color to my table, its not an assigment or anything I just want to make my different from the other kids in my class, thanks everyone :) :) …
When I look at some of my old code I got confused. The code is a bit long so I have to paste part of it only. [code] CArray<CVertex*, CVertex* &> setOfVertex; //CVertex is an object contains x,y,z coordinates CVertex *NewVertex=new CVertex(); NewVertex->Set(1,2,3); //add one object into array setOfVertex.Add(NewVertex); //release …
This question was asked to me..plz see [code] #include<stdio.h> void change() { /*Write something in this function so that the output of printf in main function should give 5 . Do not change the main function */ } void main() { int i=5; change(); i=10; printf("%d",i); }[/code] and i answered …
[code] char *name; cout<<name; [/code] and [code] char*name; name=new char[20]; cout<<name;[/code] both of these work....then why do i need memory allocation....where does the first code fails
What am I doing wrong I am not getting these values from the input file to even display correctly or sort in order. Give me some direction? [code] #include <iostream> #include <string> #include <cmath> #include <iomanip> #include <fstream> #include <cmath> #include <vector> using namespace std; class CommandLineException { public: CommandLineException(int …
Hi guys.. Well ive looked at my lecture notes and well they have examples and they are veryyyyyyyyy basic basically i get the concept but the examples are too simple to understand Something difficult... So i got this question for Tutorial and I basically dont understand of it... I was …
Hello Iam a newbie. I went through some of the binary search implementation codes and was able to understand them. But when i wanted to represent them as tree i was not able to do so, i mean i do not kn ow ho wto proceed. By tree i mean …
[B]Intro[/B] When you declare an integer variable in C, the variable is assigned a fixed memory location with enough space to hold the type integer. When you then initialize the variable with a value, the value is put into that space. Take a look at the C code sample below: …
hi,i am a student of computer engineering.i have good knowledge in C language.now i am thinking about learning S.Q.L ,database management systems,all that stuff. i am in a bit of confusion.is it necessary to learn java before going for SQL. please tell me.
hi there! I need help about this machine problem... I need to make a program that deals with PERT\CPM (simulation) . any suggestions what kinda program that is related to this??? I was thinking if a permutation program can be used.... :rolleyes: pleaz help! [RIGHT]-Hr†Z[/RIGHT]
Hi all I'm new to this site and hoping someone can assist with this problem. I've done all the code for the Tic Tac Toe game but having problems placing the 'o's & 'x's. This is the part of code I'm stuck on. Any help is greatly appreciated. [code]char PLAYER_TURN() …
Hello everyone Is it possible to use a variable for a vector name eg [code] MyVar.push_back(line); [/code]
hi guys i want write one program to hide process in windows. but i dont know how... ;) can you help me. i want any sample and source code. thanks
Hello, I've created a file and put datat into it, only problem is that throughout the operation of the program the file is "amended" and bits are added to the file. However I'm wonder if theres a way to delete the file contents so next time someone starts the appilcation …
Hello has anyone any experience of using log4cpp on borland builder 6, the open source code has a bcb5 project but there are build errors when this is transported to builder 6.. it's frustrating. Any1 know of any online documentation etc?
what is the code for making an array of objects? i would greatly appreiciate any replies thank you.
[B]1. User will enter the ISBN, The system will trace the title and price of the book automatically. The system should check whether the book is in the stock or not. If it is not, please let the user to enter again. 2. Allow a customer to buy more than …
Help me with this Simple Problem using structure in turbo C. Basic Program The Problem:Using structure 1) Consider the given data in the student Class Record a.) Enter for the name of the student and student number (10students). b.) Enter the class standing and prelim exam. c.) To Compute for …
I am having a problem with a recursion problem. I have been reading alot of threads on this subject here and other places. I think I understand what recursion is. I am just having a problem trying to figure out this problem. I am suppose to write a helper function …
im about to sign up for some college classes.. one is either going to be java or c++ for beginner. I dont know anything about these languages. Can you guys help me choose?
can everyone show me the differences between procedure and funtion / procedure and objec-oriented ? thanks !
I think I pretty much set up my enum right to the below. I just dont know what to do with it. PRoblem Description A type named Color declared by "enum" to contain only black, blue, purple, red, white, and yellow. For each set of inputs, output their sum, average, …
hello people i was wondering if anyone could come up with a program that could excatly compute the amount of time that it takes for a simple arthimetic operation. I mean lets assume that there is a simple addition program, is it possible to find the exact amount of time …
I came across this line when i was as reading a tutorial i.e. compiler increases the compilation speed by performing in-memory compilation....what does this statemant mean??.....and what is the normal way of compilation
Has anyone heaard of linux redirection? If so, how do I implement it into my code? Please help... Thanks.
can some one tell me a way to find the maximum memory limit that can be allocated to an integer array using static, stack dynamic or heap dynamic allocation. thankz
Error Loading C:\PROGRA~1\NEWDOT~1\NEWDOT~2.Dll Specified module could not be found? What can i do to find it? Thank -You Julie :confused:
I've been working on a char to hex converter all day, and it's working. Except for one part. I've got an unsigned short I want seperated into the two hex values. I've been beating on this stupid bit of code all day, and it's just not working. The hex representation …
Hello. With some friends I've opened a forum about cells ( [url]www.cellforum.net[/url] ) . Anyway, that is not the point. The point is that we need a stand alone API to be connected with the forum to perform some tasks. I am not sure if this is the right place …
hello, another stupid question but what is wrong with this? [code] infile.open("new.txt",ios::app); if (infile.fail()) { cerr << "Error"; exit(1); } [/code] ever since I've added the ios::app it keeps printing error and then haulting but from my resoruces if you want to append a txt file thats whats the syntax …
I don't know if this is possible....... i have made a program containing 3 files 1.main.cpp----it includes both complex.h and def.h....main.cpp is simple menu 2.complex.h---class declerations 3.def.h-----definations of the member functions now i want to give my code to someone....is it possible in some way that.....i give only main.cpp and …
Well wrote the code but still I have some problems, so could someone help me plz. void ageCalculator() { char birth[BIRTH],output[OUT]; static int finished,d[2],m[2],y[4],days,flag; int i; /*initialization of arrays*/ for(i=0;i<11;i++) { birth='\0'; if(i<6) output='\0'; } printf("\n Age Calculator\n"); printf("-------------------\n"); /* code to get and validate the input*/ do { flag=FALSE; …
Hi, Please see the code below. [code]void Allocate( char* s ) { s = (char*)malloc( 100 ); } int main( ) { char* s = NULL; Allocate( s ); strcpy( s,"Test");/*I know that this will fail. b'coz I still have a NULL pointer in s. Initially s was pointing to …
I am trying to write a program that reads in a file of numbers, writes to a file and displays the numbers in correct order. I don't fully understand how to read the file and pass that information into my class declarations in order to output before and after the …
Is there any sequence of left shift and right shift operators that can divide or multiply a number by a number that is not a multiple of 2 i.e. can we multiply a number by 11 using a sequence of left shift and right shift operators .
The End.