49,761 Topics
| |
Frndz, I want to now how to start learning C/C++ programming in my pc. means there is a problem with installation of normal turbo c in my computer. it is not working. [COLOR="Green"]So what software i have to install? From where i can download it? Is there any C++ software … | |
I'm new to scripting. I'm trying to find out how to target my cout to a field in a gui. Any direction will be greatly appreciated. | |
Ok this is very strange and i cannot see where is the problem and i guess is really easy but i cannot see it so i will need your help :-O My Declarations [CODE]int myGraph[4][4]; int vertices[4]; char path[4];[/CODE] My initialize code [CODE]for(int i=0; i<=4;i++) { for(int z=0; z<=4; z++) … | |
I have a function below which is supposed to read from a continuous updating file...by another program. for this reason I used a fileptr int to keep track of the last known good read so this index value is updating correctly but it is not being used by getline. and … | |
Hello everyone! I am programming a vector which stores a name and a number. [code] typedef pair<int,string> Users_Pair; vector<Users_Pair> Users_Name; [/code] And the vector expands and contracts through out the life of the program. But when I use erase all elements above the one being erased loose their string? I … | |
Hi everyone I want to open the Directory like this using C++ in linux eg : /proc/1/status where proc and 1 is a directory and status is a file,which i want to access(i.e)this file i have to copy to an string to access some information..................can anyone help | |
...so I'm trying to make a program that takes in the three sides of a triangle and then decides whether the triangle is equilateral, isosceles or equilateral. I have to have 2 different functions and I can't use global variables ( That's what my teacher wants ). My main function … | |
Simmilar problem again using a vector of length 4 [CODE] vector <char> something; something += '1','2','3','4'; somefunction(something,4); [/CODE] some function takes in a [CODE]char* ptr, unsigned int size[/CODE] at the moment i am getting "error C2664: 'something' : cannot convert parameter 1 from 'char' to 'char *" any help would … | |
hi all...recently i was given a project of making a scientific calculator using microsoft visual C++....so i downloaded some codes...but there is this graphics.h file which is not supported by VC++ !!. can any one help me with the codes of a scientific calculator in VC++...without using any graphics.h file … | |
I have been working on a text based adventure game as a project for school. I have become very well acquainted with functions, loops, arrays, etc. I now have to begin thinking on a senior project utilizing something we worked with this year and I love to code but I … | |
Hi, I have an application which fills a text file continuously and my program monitors that file for a string match continuously. My search function is fine..but Since the file keeps on growing is there a way I can read from the position I left off last or do I … | |
When testing the output of a variable of type double, with [B]expected results = 48.66573405[/B], I am getting an [B]actual result = 48.6657[/B]. Why is the expected result being rounded when the whole idea of using type double is to increase the precision of your calculations? Thanks FWD | |
Hi all, I'm trying to create two classes which each of them contain a vector of object of the other class. Below is roughly the idea of what I'm trying to do but it seems that it cannot work as it will end up into infinite recursion or something. What … | |
Hi everyone, So I have a binary tree class, Stree, that holds names of cities and pointers to other cities. Running the program and typing "insert Memphis Atlanta" inserts a node with Memphis, and inserts a node with Atlanta as Memphis's left child. Typing "insert Memphis Tampa" inserts a node … | |
Salam, lets say I have declared: [code=c]int* array=new int[SIZE];[/code] (I used this array as if it was a 2D array - lets say that I'll consider these dimensions: row, column). and I want to pass this array to a function that will fill the array row by row. (The function … | |
I've been writing a pig latin translation program for a week in class now and i've gotten so far but now i don't know what to do. i need to check if the word has a vowel as the first letter then only add ay in the end if it … | |
The program below is executing fine but when I enter the last of 10 numbers and the final output(shows the average of the 10 numbers) is displayed, I get the following error message: Run-Time Check Failure #2 - Stack around the variable 'numbers' was corrupted. If someone could explain what … | |
I am using VS2008, OS win vista. i am in the process of coding an application that would tab automatically (this is just an example, not the code i am intending to do). So basically, what i expect is to write a C++ code that could press the 'tab' button … | |
[code=c] #include <cstdlib> #include <iostream> static void fillArray(int **array); int main() { //allocating a 2D array int **array; array=new int*[10]; for(int i=0;i<10;i++) *(array+i)=new int[5]; //sending this array to a function fillArray(array); for(int i=0;i<10;i++) for(int j=0;j++;j<5) std::cout<<array[i][j]; for(int x=0;x<10;x++) delete[] array[x]; delete[] array; return 0; } static void fillArray(int **array) { … | |
What is the difference between int and unsigned int? | |
Error 1 error C2440: '=' : cannot convert from 'const char [2]' to 'char' [CODE]bool word(char *Filename){ int r,number,length; ifstream file; file.open(Filename); file>>number; srand ( (unsigned)time ( NULL ) ); r=rand() % number+1; string input,word; for(int i=0; i<r; i++) getline(file,input); length=input.length(); for(int l=0;l<length;l++)word[l]="_"; cout<<input<<endl<<word<<endl;; return true; }[/CODE] | |
Hi all, I am pretty new to c++ and linux. I am developing an application where backup of files occurs when ever a new file or a deletion of a file is done a specific directory. for this purpose i use rsync to make a backup on a remote server. … | |
what is worng with this code [CODE]#include<iostream> #include <graphics.h> #include <stdlib.h> #include <stdio.h> //#include <conio> int main(void) { /* request auto detection */ int gdriver = DETECT, gmode, errorcode; int midx, midy; int radius = 100; /* initialize graphics and local variables */ initgraph(&gdriver, &gmode, "C:\\Dev-c++\\include\\graphics.h"); /* read result of … | |
Using Borland C++ 3.0 Here's my code: [CODE] #include<iostream.h> #include<conio.h> int main() { int m,d; int i=0; clrscr(); cout<<"\nEnter Birthday month: "; cin>>m; cout<<"\nEnter Birthday day: "; cin>>d; cout<<"\n"; { if(m==3 && d>=21) cout<<"ARIES!"; else if (m==4 && d<=20) cout<<"ARIES!"; else if(m==4 && d>=21) cout<<"TAURUS!"; else if(m==5 && d<=21) cout<<"TAURUS!"; … | |
[B][U]Hi, this is kind of silly request, can anyone help me with these three C++ progs[/U]:[/B] [B]I - Predefined number of operation Calculator[/B]: [U]e.g[/U]. 5 + 12 - 3 10 / 3 - 5 /12 The program should ask for the following 1- number of operations 2- the equation for … | |
Hello All, I am trying to solve maximum flow, and I am experiencing some problems formatting the output. Here is some pseudocode I am trying to implement. c [u, v] is capacity from u to v, f [u, v] is the flow, cf [u, v] is the residual capacity. for … | |
hello, I'm a newbie to opencv. I'm doing a project using c++ and I use opencv for image processing. So for that I need to capture two video streams at the same time. before doing processing part I try to display both videos from cameras on two windows. But it … | |
Ok I have a little problem.I have a pointer in the struct which I don't know how to use as or move the information into an array on the bottom function. Need an explanation. Anyone please help... [CODE] // This is the minimum functionality for this exercise // Notice that … | |
I basically know how functions work now but this problem is just confusing me. Lowest Score Drop Write a program that calculates the average of a group of test scores, where the lowest score in the group is dropped. It should use the following functions: -void getScore() should ask the … | |
| I want to have a live clock in the statusbar. When I put SetWindowText before the switch in the callback, like this: [CODE]BOOL CALLBACK MainDlgProc(HWND hDlg, UINT wMsg, WPARAM wParam, LPARAM lParam) { time_t rawtime; struct tm *timeinfo; time(&rawtime); timeinfo = localtime(&rawtime); strftime(thetimeis,79,"Current Date and Time: %A, %B %d, %Y … |
The End.