49,757 Topics
| |
i have this question in mind since i first found out that you can declare and array like this [CODE] <type>* nArray [/CODE] how does the compiler how much storage to allocate? i've heard that it doesn't allocate any storage, it just points to some address and when you use … | |
hi people I have a project that requires me to use time.h in animation. can anyone show me a simple code of animation using time.h??? | |
How can you combine different c++ programs into one full software. I am using the Code::blocks IDE | |
Hi all, I'm new to c++ and currently i need to write a program to open csv file and store all data into a vector of double. After trying my codes for few days, i have encountered a problem. I couldn't load all columns of csv data into an array.Please … | |
hi guys. there is this c++ program i have wrote and i would like to use time.h in order to manipulate the way strings are going to be displayed in my program. the lecturer said it is possible but the problem is i just dont know how to do it. … | |
Hello.I've been looking for a free C++ compiler for windows which supports the new standard features but i had little luck so far.Does someone have any knowledge of one? Thank you in advance. | |
i really need a GOOD socket tutorial, i've followed some of them from google but they aren't complete, i know that socket programming is forked into many categories, basically i am interested blocking & non blocking sockets, synchronous & asynchronous sockets(used with select() and FD_ISSET macro etc) PS: i know … | |
ok this is one of the many things I don't trust google on. What is a good new compiler (C++ and D would be nice) for Linux? Kubuntu PS Is the system() function universal as in it will do the same thinge in Linux Windows and OSX | |
Ok so I want to have the user imput a name of a file to decode it. How would I do that? EX: cin>>fill ifstream in (fill) | |
[CODE]#include<iostream> using namespace std; void prin();//statement a main() { int x; //statement 1 x=34;//statement 2 return 0; }[/CODE] I wanted to know if the variable x is allocated memory in statement 1 or in statement 2. Its a long time doubt and no one really gives a clear and confident … | |
[CODE]// bintodec.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include <iostream> #include <string> using namespace std; int main(){ string inp; int dec = 0; char base; cout << "Input a number: "; cin >> inp; cout << "Input the base your number is in: "; … | |
this program calculates all the prime numbers between two input numbers num1 and num2. first an array is created and num1,num1+1,......num2 are stored in that array and then all elenemts of array are scanned and if they are divisible by any odd number except itself or by 2 then 0 … | |
The input for this program should be like this: How many tests? 4 Grade on Test 1? 95 Grade on Test 2? 88 Grade on Test 3? 80 Grade on Test 4? 96 Your average is: 89.75 <------- this is where I can't get it right, can anybody take a … | |
I am trying to use functions in the following program. The program is supposed to use a vector of structures to store a students first name, last name, and grades. Also, to get a average for each student and a class average. I do not think I am calling the … | |
I have nearly finished an assignment that calls for implementing a media library. I have pinpointed my current solution for the addItem method in the library class as a memory leak, but so far I am not certain how to fix it. The addItem method I have so far is … | |
I have already downloaded eclipse SDK (the java version) but wish to download CDT so that I can write in C++. Referring to the website ([url]http://www.eclipse.org/cdt/downloads.php[/url]) I tried exactly what they said. I went to help-->Install new software--> clicked ADD --> and pasted in the location ([url]http://download.eclipse.org/tools/cdt/releases/galileo[/url]) since I have … | |
[CODE]#include<iostream.h> int main() { int num,j,c=0,limit,i,k; int*freq=new int[]; int*munam=new int[]; cout<<"How many times u want to enter the numbers\n"; cin>>k; cout<<"tell ur range in which u will enter\n"; cin>>limit; for( i=0; i<k; i++) { cout<<"Enter number\t"<<i+1; cin>>munam[i]; if(num>limit) { cout<<"invalid num"; return 0; } for( j=0; j<limit; j++) { freq[j]=0; … | |
[CODE]#include <iostream> #include <cstdlib> #include <math.h> #include <iomanip> using namespace std; const string FILLER = " "; int main() { int w1 = 20; int w2 = 20; int w3 = 20; int w4 = 16; //variable declarations string firstname,lastname; int marital_status; float gross_income; const float tax_rate_0 = 0.10; const … | |
Can you guys give a code or something. Any simple graphics would do. i have initiated my graphics.h I've tried using the codes i found online but they give me errors. LINKER errors. Please help me. Thank you! | |
I am trying to display the sNames vector. I am not sure if I am storing the information correctly. Any help would be greatly appreciated. Also I am trying to get an average for each students exam grades and a class average, and I am not sure how to go … | |
if i declare size 5 array [CODE]char ch[5]={'1','2','3','4','5'};[/CODE] Then the null will store at the address ch+5 ? even i didn't declare the size for the null to place. If so mean it may overlap value on that memory address? | |
I am attempting to make a number guessing game but I need to use functions I figured a good spot for this would be the greater and less than problems that I need to include to make the user know what they have, I am horrible with functions and dont … | |
OK Im new to C++, I'm still a beginner, i know how to make simple calculations and all. But looping is completely different and I have no idea where to start: Here's all that I have for this question (Write an application that keeps inputting an integer from the user … | |
Is it possible? How do I do it? I need a function to return the players name, so I have this as the prototype: [code]string getPlayerName();[/code] And this as the function: [code]string mainFunctions::getPlayerName(){ return playerName; } [/code] But I get an error saying that the function called 'string' doesn't have … | |
I have a experience of network programming in java... now i want to implement them in c with more better support, i have used c++ long time a ago... Now i dont know which compiler of c++ is better, which support socket api... and which operating system provide more flexibility … | |
hello, i am a C beginner. please check the code for me. The program is running fine,but is not giving the correct output or should is say no output. The output supposed to give the code of the team that ranked higher. #include <stdio.h> char rankTeams(int, int, int, int, char, … | |
Hi all. I'm writing a program to explain and verify the birthday paradox. I am generating 1000 sets (only 10 to test with) of birthdays, checking for matches, then displaying the results. I'm using srand to seed my generator and rand() to get 23 sets. The problem is 2-fold. 1) … | |
Ok this is somewhat of a second related post of my other one "C++ File". There is no need to read the other post just want to tell you. I want to make a console app that does the XOR thing I heard about using the simple ifstream and ofstream … | |
Why operating system is kept in low memory with interrupt vector? | |
The End.