49,761 Topics
| |
Hi I want to know how to compile c++ codes using the command prompt in windows. In linux I do [code]g++ filename.cpp -o filename[/code] and run it using [code]./filename[/code] but for windows when I try this procedure in compiling i got an error message [quote]'g++' is not recognized as an … | |
i want to know what are the lower triangle and upper triangle mean in a matrix. For eg: if matrix is [ 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 ] then what will the lower triangle and upper triangle in this … | |
Hi, i have a problem with a vector. I declare a vector<char*> moves; in header. Code: [code] void LogView::init(){ int a = 0; while (LogFile.good()){ LogFile.getline(line, 6); moves.push_back(line); cout << "vector :"<< moves[a]<< endl; // here is OK a++; } moves.begin(); cout << "vektor :"<< moves[1]<< endl; // here is … | |
I am brand new at C++ and I have a programming assignment I have to do. I have to create a directed graph and perform a breadth-first traversal. I have to use an adjacency linked list implementation without using any existing libraries as Standard Template Library. Where do I begin? … | |
hey guyz... i'm new here... i just want to know how i could end my program after a certain amount of time has passed by... I'm doing a "text twist" program where after 2.30minutes and if the user still has not guessed the correct answer, the program will end... i'm … | |
hi! to everyone i have to make a program in c++ about factorial but the main problem is that the working of factorial must me shown for eg. 4!=4*3*2*1 like this on the output screen i had done upto here.... [code=cplusplus] #include <stdio.h> #include <conio.h> int main() { long float … | |
How can i run my program for a specific amount of time? And what is threading? I'm really new to C++ so i'd like n00b-friendly answers. | |
Hi Im new to the whole thing of programming and would like to write a C++ program to copy files from one drive to another, any help and suggestions on where to start? Any help with source code or pointers will be greatly appreciated. The OS the program is for … | |
My instructions are to write a program that assigns a five-word phrase with a single space between words to a user-defined string variable. It then outputs each word of the phrase separately. It must use the phrase "This is a test phrase" in the output, but also function properly when … | |
I would appreciate if anyone could help me with my program that calculates a hand of black jack. I know the way I created this program is probably not the most effective way but the only thing I seem to have problems with is getting the program to add 10 … | |
I'm trying to read in the chars for a file in order to compare two text files. The problem is I can't seem to load space characters into my vectors. Any suggestions for me? [CODE] vector<char> cyphVector; char c; //fill vector with cypher file chars while( cyphFile.good() ){ cyphFile >> … | |
I am trying to built the program for handling polynomial... using linklist.... and so far i tried to implement in the Class to add the 2 polynomial using the operator overloading i got messed up with the some objects.... i have commented the parts please help..... [CODE] #include<iostream> using namespace … | |
Hi could anyone tell me how to compile a three tear program in VC++. I am using g++ in school and so for practice at home I am using VC++ but I just can't get it to compile. thanks in advance. | |
Ok, this is probably really stupid, but I'm lost and want someone else to say what they think. My teacher gave us an assignment and said that everything was in the file she sent us. So, I opened it and filled in all the coding as far as the comments … | |
I would appreciate if anyone could help me with my program that calculates a hand of black jack. I know the way I created this program is probably not the most effective way but the only thing I seem to have problems with is getting the program to add 10 … | |
[code]return tree == NULL ? -1 : tree->height;[/code] I am trying to understand AVL trees but the one really nice example I found has a couple of methods defined like this. It is really pretty but I cannot read it? Can someone explain it to me? Or even just write … | |
Hi, is it possible to find out the size of an array created on the free store? thanks | |
//challenge,, fix this! [code=cplusplus] #include<stdio.h> #include<conio.h> void main() { struct job{ int at; int bt; }; struct job J[80], cpy[80], temp, cpy2[80]; int q, oh, jbn, x, y, z, t, ref=0, tt[80]; again: clrscr(); textcolor(YELLOW); gotoxy(20,5); cprintf("*** ROUND ROBIN WITH OVERHEAD ALGORITHM ***"); textcolor(10); gotoxy(5,7); cprintf("How many jobs do you … | |
Hi, Please help me doing Program for "Game of life". Here is the link for that: [url]http://en.wikipedia.org/wiki/Conway%27s_Game_of_Life[/url] | |
I am develping a program to create an rtf file.The rtf file will be having images in it that will form a border around the page. Here is the code so far: [ICODE] #include "rtflib.h" #include "globals.h" #include "errors.h" void main() { // Set RTF document font and color table … | |
Now, we all know that // makes a comment. But I have a question about the compiling of the program? Say you were to make a comment with a whole bunch of underscores to signify a different section of code. Does the amount of comments written in the source code … | |
I'm a beginer in OpenGl. I downloaded glut 3.7.6 package but I didn't find glu.h, glaux.h, opengl.h, opengl32.h and gl.h in there. Where can I get it ? And if I've found it, how to set it so it can work well. I'm using VC++ 2008 Express. Please tell me … | |
Write a complete function: DNA represented as a list of the alphabet letters A, C, G and T. How many times the sequence ACG occurs in a specific DNA string. (An example: If the list is CACGTTGCGTACGAA, then the number of occurrences of ACG will be 2.) Write function nrACGOccur. … | |
I am at the end of my first term in my C++ classes. I have managed well so far, but this program is completely frustrating me! Please help me figure what to do. Okay my assignment is kind of complicated for me.....here is what I am supposed to do, followed … | |
//can someone debug this program,,, thanks,,, [code=cplusplus] #include<stdio.h> #include<conio.h> #include<dos.h> #include<graphics.h> #include<stdlib.h> #define N 100 struct processors //PROCESS ATTRIBUTES// { float burst; float arrival; int priority; int num; }p[20],temp; struct ssss { int no; int xx; float arr; float burst; float ww; int pri; float wait; }process[N]; void main() { … | |
I am using Visual C++ 2005 with SP1 why does the following code generate a compiler error (error C2062: type 'int' unexpected)? [code] for(int i=0,int j=0;i<5;i++,j++){} [/code] Note the following two variations generate no compile error [code] int i,j; for(i=0,j=0;i<5;i++,j++){} [/code] [code] int j; for(int i=0,j=0;i<5;i++,j++){} [/code] Is this just … | |
Hi, I was hoping that someone could give me some direction with how to solve this probem. The only info in this problem is word has N digits[only digits] and the numbers (output) should be in increasing order example 1469 or 468 The output should give all combinations in the … | |
Hello everyone, I am having a really difficult time getting this program off of the ground. I need to use a while loop to read data from a file and then read tonnage numbers corresponding to names read in from that file. The assignment looks something like this: [I]After watching … | |
what is a global variable? is that when the variables are located outside of int ()?? | |
hi everyone, I am making a textpad(basic textfile creator) in c++(console). It can create text files and then load them. But the problem is that when we load a file it can only show the data but not edit it or write further data. How do I code such that … |
The End.