49,761 Topics
| |
Why is the last element not 7 [Code] int array[3]; int *ary; ary=array; array[0]=0; array[1]=0; array[2]=0; array[3]=44; for (int i=0;i<4;i++) { cout<<array[i]; } cout<<endl; *(ary+0)=1; *(ary+1)=0; *(ary+2)=0; *(ary+3)=7; for (int i=0;i<4;i++) { cout<<array[i]; } cout<<endl; [/CODE] Output 00044 1003<-----------------Why 3 and not 7!!!!!! | |
I was hoping that you could help me with some problems colleagues and I are having with a psychometric tool that we are developing for a short-term project. We were hoping to utilize Visual Basic C++ to get the job done. What we are essentially trying to do, but can't … | |
I've checked through the book list tagged on this forum, very helpful, but far too many books listed to efficiently check them all out. I already have one book on c++ (the teach yourself in 21 days), and it's nice, lots of short and to the point examples, but their … | |
I wud like u to suggest me some project in c++ or in computers for summer training for 1 month . I have just completed my 2nd year of b.teh | |
I'm writing a program in VC++ 6.0 professional and am encoutering a baffling error. The program compiles fine, but seems to be fed up with anymore member functions. If I add one in the header implementation it still compiles but if I call that function anywhere in the program I … | |
Hi, i've been reading about c++ advanced concepts such as polymorphism, (multiple) inheritance, templates, operator overloading and others. It all seems more or less clear to me but i know i would never really understand all these language features until i've used them. the problem is that i don't know … | |
Hi all, I created a string object and printed its size. Its always priniting output as 16. Why is it like that? Can anyone give me idea about how string class is implemented. I am using VC [COLOR=blue]string input; cin>>input; cout<<sizeof(input)<<input<<'\n';[/COLOR] | |
[B]Hi Everybody, i am working on C++ and Oracle both but now i want to connect them,i want to retreive data fron SCOTT database of oracle using C++....i have no idea about it please help me....how to write a program,what steps to follow..[/B] [B]Priya[/B] | |
I am a student doing a research project at NIST, and as part of my project I have to run a series of simulations. My problem is this: I inherited the C code for the simulations from a previous student researcher who wrote it using Microsoft Visual C++ on a … | |
Hello group, Could anyone of you tell me how to convert string to const char* in C ....function c_str() is not working ...i dont know why............ Thanks... | |
I can't seem to use the 'cin.get' statement for getting character arrays. I've just switched to VC++ Express, from Dev-Cpp, which allowed that. I have tried other methods like declaring the variable with 'string' but the compiler doesn't recognise it even with the <string> header. [code] void encrypt() { string … | |
Hi everyone I am really having trouble right now with oracle for linux. Please tell me how to connect oracle using c/c++ in linux. If anyone knows about any tutorial or have code, please plzzz post me that as well. | |
Hi, is there a function to send a mail in C++ Builder? Kind Regards, Rowin | |
Please help me here. I am having problem in solving my home work problem in C++. I have attached my home work in a word doucment here. My home work is due on July 13th. I will be thankful. Thanks a lot. | |
I have just started with a tutorial in c++ and i wonder if anyone can tell me what´s wrong with this code [code]#include <iostream> using namespace std; //so the program can see cout and end1 int main() { for (int x = 0; x < 10; x++) { cout<< x … | |
K, It's fairly easy to use a ostringstream object or a derived class to output text like a normal stream class like cout. Eg. [code] class console: public ostringstream { public: void Render() { std::string buff = ostringstream::str(); //Some code to put it to screen //Write it to a file … | |
Hi, I am bit confused with the concept of pointer to a data member of a class. In the below program what actually will the pointer variable be storing? When i tried printing the value of address I got value 1, Whatt does it mean? [COLOR=blue]class A{ public: int d; … | |
Hi, Could someone tell me how I can delete files using a shell script or c++? The condition for deleting files: compare all files (say *.deb files) in folder A to those in folder B. If any file in B is also contained A, then delete the one in B. … | |
Hi, I've been wondering for a long time how one program can affect another program during run time by adding featues, retrieving information, submitting information and those sorts of things. One example of this might be a program like DeadAIM, which affects AOL Instant Messenger, or (doubtedly) if your in … | |
Help!!!!! I'm sorry to ask for help again but...... This question even difficult than the previous one..... Please write C++ code for the following algorithm: 1) Store first memory location of program into base register 2) Set program counter equal to address of first memory location 3) Load instruction of … | |
Halo....I'm new here...... Can somebody help me with this question? Its a assignment but I REALLY DON HAV ANY IDEA HOW TO DO IT!!!! So....Plz help...... Write C++ code for the following algorithm: 1) Determine job's reqeusted memory size 2) if job_size>size_of_large_partition then reject job print appropriate message Go to … | |
Hi,My name is Jatinder Kumar from India(Punjab).I have done B.Tech. in Electronics & Communications Engineering.Iam interested in software programming .I have also interested in hardware. | |
I'm not going to post the code on this one just incase it's a little confusing. But here's the jist: I have a couple of nested loops with multiple (var)++'s inside as counters. Each counter resets itself after reaching 25 and the total of the counters much equal 120 in … | |
So here's what I'm trying to do. Basically, I have a huge text file of strings which are delimited by a delimiter. I would like to read each string separately based on the delimiter. Note that each chunk can span several lines, so I don't want to read it line … | |
Given a set of data (two columns of data, flight path angles and lift coefficients) in a separate file, I need to write a program so the user can input a flight path angle and the program will return the appropriate lift coefficient given (if their angle matches one in … | |
Yea, just recently I enrolled into a basic computer programming class. We use Turbo Visual C++ and umm so far it went okay until we talked about do-for-while loops... Can anyone help in making a program in loops >_< I mean I tried using the goto statements but my professor … | |
I start to write a code for a shell with some basic functions: open files, save files, create files... I try to use the ifstream for opening files. I found the constructor - ifstream openfile("file.txt", ios::in); I try to use this constructor in the way (function openfile()) that I can … | |
good day, I am an incoming 2nd year IT student and am encountering a problem in creating a "turtle graphics"(from the famous Logo Language) program using C. This case is found in the book of deitel and deithel, "C how to program" in the chapter of Arrays. it has almost … | |
Hi, I'm looking for a function that will convert CString to char*, I found the function [code] char* ConvertToChar(const CString &s) { int nSize = s.GetLength(); char *pAnsiString = new char[nSize+1]; memset(pAnsiString,0,nSize+1); wcstombs(pAnsiString, s, nSize+1); return pAnsiString; } [/code] The problem is you cann see that there is the use … |
The End.