49,757 Topics
| |
Hello. I'm still fairly new with C++. I started on a code with a friend, but I'm still very unsure about setting up loops and such. Some help on where to go next with this problem would be much appreciated! This program requires you to input information about vehicles in … | |
Hey all, i have been reading some c++ books and they talk about a variable type called float but they also mention another one named double and another one named long double but what i don't understand is the difference, the furthest i get is that they tell me float … | |
i have a code that reads lowest and the highest number with inputs that are all Integer but, once i have an input (ex. apple 200)...it wont read anymore, need help in what to input code that ignores letters [CODE]//reads numbers only ex. 100 200 300 int main() { ifstream … | |
iamd using turbo c++ 4.5 and i need help in creating gui there i need some tutorials for that .. | |
The problem is in dayOfWeek () I think. It may be overloaded or something. [code] #ifndef DATE_H #define DATE_H class Date { public: Date( int = 1, int = 1, int = 1900 ); // default constructor void print() const; // print date in month/day/year format int dayOfWeek (); // … | |
Hello I want to create a web plugin to demonstrate some inverse kinematics algorithms on a basic 3D model on a web browser. I am using OpenGL API and my code is written in C++. I am really new to plugins and I have no clue where to start looking. … | |
| I recently found an old game in which the soundtrack is read from an audio cd. I would like to redirect this via a proxy dll (winmm.dll) to read the soundtrack from certain mp3 files, possibly via FMODEx. So far I have been unsuccessful in every attempt. The game calls … |
Hello, I've copied a multiarray into another multiarray and can't figure out how to convert an int of 1 into an asterik which is ascii 42 I believe. I need help to replace all 1's to an asterik. I've tried static cast which my instructor suggested but I must be … | |
Hi, my assignment asked me to make a 3 row, 7 column array that asked the user to input amount of food for 3 monkeys. 7 represents the number of days. It should tell the user the average, highest and lowest amount for this.. Here is what I've got so … | |
I've got a program that has three different classes, all of which have their own pointer to an class called ObsFileName, who's main functionality is to store the name of an output file individual to the class, and return it with a function value(). All throughout the program, when a … | |
Please excuse me but what is SAPI reference API? :icon_biggrin: | |
As I know that .c is the extension format for c coding while cpp is the extension for c++. But I noticed that there are some c++ project use .c extension instead of cpp, is it both extension is supported in c++ compiler? | |
I am trying to create a C++ program that queries data from an ODBC data source. I am very comfortable with C++ and SQL, im just not sure how to set up an ODBC connection in C++. I have tried searching google and have not been very successful. Im using … | |
I'm creating a linked list,adding the data I've read from file in each node but as I'm trying to print what I hold in nodes my output is some symbols.And even when I cout what I hold in my nodes in ADD function it's ok but as it goes to … | |
how to reverse a string in character array without using string functions... | |
#include <iostream> #include <cstring> using namespace std; int main() { int i,n,len; char x[3]; char status[15]; cout<<"This is an airplane passengers seats program"<<endl<<endl; for(n=1;n<=7;n++){ cout<<n<<" \tA\tB\tC\tD"<<endl<<endl; } cout<<"Please enter your seat accordingly : "; cin.getline(x,3); cout<<endl; len=strlen(x); // for (i=0;i<=len;i++) // x[i]=toupper(x[i]); for(int j=1;j<=7;j++){ cout<<j<<" \tA\tB\tC\tD"<<endl<<endl; } cout<<"Thank you for … | |
Hello All, I would like the user to be able to choose the file_name (assuming it already exists) and be able to append information to it. However, this condensed version, below, of what I'm trying to do gives me a compilation error. I feel like it has something to do … | |
#include<iostream> #include<string.h> int main() { char* str="my name"; /*plz explain what is pointer-name,and what is string- name here(realy confused) ? i am new to pointers :) */ int len=strlen(str); char* ptr; ptr=new char[len+1]; /*is this ptr pointer or string*/ strcpy(ptr,str); cout<<ptr; delete ptr; /*how this works */ cout<<endl<<ptr; /*this 'ptr' … | |
Hey! Again, small but devious problem for me: I have a string that gets time as an input, in a format like "9.45" or "15.37". How do I extract the hours and minutes to integer variables, when the hour part may consist of either one or two digits? If it … | |
Hi, Is it possible to allocate memory using malloc() (C) and release it using delete (C++) or even the opposite Alocate with new (C++) and release with free() (C) If not Why? | |
free online test of C/C++ <URL SNIPPED> | |
Write a program to assign passengers seats in an airplane. Assume a small airplane with seat numberings as follows: 1 A B C D 2 A B C D 3 A B C D 4 A B C D 5 A B C D 6 A B C D 7 … | |
Hi, im just a beginner in C++ and was wondering what exactly are pointers used for? Are they just to refer back to something or are they used differently than that? I was reading through the chapter on pointers in my programming book and it doesn't really clarify. | |
Hi guys, i have this D3D code here: [code]void drawArrow(float x, float y, float yaw, D3DCOLOR color) { D3DXVECTOR2 points[3]; points[0] = D3DXVECTOR2(-3, 5); points[1] = D3DXVECTOR2( 0, 0); points[2] = D3DXVECTOR2( 3, 5); D3DXVECTOR2 points2[3]; float rad_dir = D3DXToRadian(-yaw); for (int i=0; i<3; i++) { points2[i].x = ((points[i].x * … | |
Hi All, I just created a simple displaying of photos in a CLR window form application just like a slideshow of photos. With the code below that is within a button_click, however the form will displayed only the last pic (picgen(3)) after all the sleep time of 4.5s. What should … | |
hi all, i need to read coordinate from a .txt file to draw lines , here is the example of the file [code=txt]1E20, 1E20, 1 154.0872,3703.414,1955 178.458,3719.069,1955 239.8909,3753.263,1955 1E20, 1E20, 2 2480.712,105.5662,1950 2486.905,144.5641,1950 2512.991,215.5622,1950 [/code] lines 1 to 4 is line 1 coordinate lines 5 to 8 is line 2 … | |
Hello every one, I am new in C++ and I have a new project. I have a text file with numbers that are coordinates x,y The text filesĀ“s format looks like this: X Y 234 5678 343 3456 193 235 and so on Steps, 1.- Put all this file in … | |
Hi guys, Im working through accelerated c++ book and in chapter 4 ex 2 i had to build a program that displayed the square of ints (i) 1->100 inclusive using setw() to align the results. this i did ok and it works fine like 3 lines of code. However in … | |
Hello. I am currently creating a software that requires the detection of "cheating." While my software is open, players will not be allowed to have certain types of content open. Ex: --- Lets say that my software, is a Chess Server. In order to prevent cheating, my software must be … |
The End.