49,761 Topics
| |
Hello all, I am have a text file with a list of windows services. Is there a way to check if the computer I'm working on has a specific service installed(Currently Win7 but needs to work for Vista and XP too? I want to do something like this: [CODE]bool found … | |
Hello there; I am new to object oriented programming need to use vectors. basically I have data from CSV file and I stored it in a vector. I need to partition this vector to n vectors and I need it to be dynamic. I started using class in order to … | |
[CODE]#include <iostream.h> #include <windows.h> #include<conio.h> void gotoxy(short x, short y) { HANDLE hConsoleOutput; COORD Cursor_Pos = {x, y}; hConsoleOutput = GetStdHandle(STD_OUTPUT_HANDLE); SetConsoleCursorPosition(hConsoleOutput, Cursor_Pos); } void clrscr(void) { CONSOLE_SCREEN_BUFFER_INFO csbi; HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); COORD coord = {0, 0}; DWORD count; GetConsoleScreenBufferInfo(hStdOut, &csbi); FillConsoleOutputCharacter(hStdOut, ' ', csbi.dwSize.X * csbi.dwSize.Y, coord, &count); … | |
[CODE]#include<iostream.h> int liner(int [], int ,int ); void main () { int a[1000]; int arraysize,element; int searchkey; cout<<"Enter how many elements in your array"; cin>>arraysize; cout<<"enter the elements of the array "; for(int i=0;i<arraysize;i++) cin>>a[i]; cout<<"Enter the searchkey"; cin>>searchkey; element=liner (a,searchkey,arraysize); if (element!=-1) cout<<"::::Found value in index \n"<<element<<"\n"; else cout<<"::::value … | |
[I]<<mod edit: answer to [URL="http://www.daniweb.com/software-development/python/threads/32007/1496502#post1496502"]this post[/URL] from the sticky "[URL="http://www.daniweb.com/software-development/python/threads/32007"]projects for the beginner[/URL]">>[/I] [CODE] #1 * 8 + 1 = 9 #12 * 8 + 2 = 98 #123 * 8 + 3 = 987 #1234 * 8 + 4 = 9876 #12345 * 8 + 5 = 98765 #123456 … | |
Hey i'm [B]trying[/B] to write code for a word utility program for a uni project and it is bugging the hell out of me. [CODE]#include <stdio.h> #include <string> #include <iostream> #include <fstream> #include <Windows.h> #include <string.h> #include <cctype> #include <algorithm> #include <vector> using namespace std; const int size=300; int a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,i1,option,Mirrorimage,spacenumber=0,characternumber=0,averagelength=0,Uppercase; … | |
Hello Programers, web designers, reverse engineers, coders, game coders [COLOR="Red"]other...[/COLOR] What Language Do i First learn to master all? i have a small knowledge in VB6 and vb.net but what do i need to learn first to master all language im dedicated to study hard and master the languages and … | |
Hello, I need to a webservice that could be use in c++ and php and easily work on linux and windows compilers (my windows compiler is visual c++ 6) can anyone help me on this? | |
Hi all. I hope this is the right place to post this. I am a music technology student and I've recently picked up learning C++ as it would greatly help my career knowing a programming language, especially this one since it is used in the video games industry. Anyways onto … | |
please some one can give the idea... what kind of program can i make by using this contains at least 4 techniques (array, function, pointer, structures, file processing, object-oriented) by using c++.... PLEASE I NEED IdEa... | |
Hi everyone, My question is: I have two vectors, for example vectorA and vectorB, vectorA is filled with randomics values, like 23, 43, 54, etc, and its have 1000 members, like vectorA[0], vectorA[1], etc. My vectorB descending of vectorA, I use the "push_back" function to take the values of vectorA, … | |
Hello. I have a two [B][COLOR="Red"]structure[/COLOR][/B] arrays that are sorted. ı wanted to put these arrays into third array as a sorted. and then ı wanted to put these values into the file. into my array one and array two , there is no same number so ı thought something … | |
So i have a matrix. (n rows, m cols), and my program has to count the number of rows, where all the cols were >0. For eg. there are n cities, and m bird species. The program has to count the number of cities, where all the bird species (m) … | |
Hello, I need a way to wait for threads and I don't think that pthread_join works in my case. Here's the problem. I'm currently working on a very basic space game. We have vehicles that collect resources and must bring them back to the HQ. In order to do this … | |
Hi, I am trying to pass a string to a MACRO using -D option in gcc. I am not getting desired output, below is snippet, please let me know what I am missing. $ gcc -o finame -D CORE="op1_log.txt" finame.c [CODE] #define STR(x) x int main() { FILE *fp; char … | |
Hey guys, I need to make a program that lists out an average, highest and lowest stock price over a one month period. I'm focusing on the average first but it's already giving me problems. [url]http://omg.wthax.org/error_4.png[/url] Here's what I have so far. [CODE] # include <iostream> using namespace std; int … | |
Hello I need to do a line by line compare between two Msword 07 documents. I've tried the conventional way of using getline and compare but it doesnt work. While step by step execution, the program is unable to recognise the format of the sentences in the word document. I … | |
I would like to write function that takes the input from the user and stores it in an array. my problem is that i do not know how long the input is going to be. i read up on dynamic arrays and pointers but got very confused. e.g. if the … | |
heres my code: [CODE]#include<iostream> using namespace std; int main() { int x; for(x=3; x<=47; x++) { cout<<x; } system("pause"); return 0; } [/CODE] i just want a little help with this problem: this code cout counts from 3 to 47 but i want to cout 3 then adding 2 to … | |
this code is meant to input words from file, and output to file the amount of letters in them and how many words there are [CODE]#include<iostream> #include<iomanip> #include<fstream> #include<cmath> #include<conio.h> #define in_file "data.txt"//input file name #define out_file "result.txt"//output file name using namespace std; void inputwords(int&, int&); void outputwords(int, int); ifstream … | |
[CODE] ///////////////////////////////////////////////////////////////////////////// // // Dialog // IDD_DIALOG1 DIALOGEX 0, 0, 316, 180 STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Dialog" FONT 8, "MS Shell Dlg", 400, 0, 0x1 BEGIN DEFPUSHBUTTON "OK",IDOK,205,159,50,14 PUSHBUTTON "Cancel",IDCANCEL,259,159,50,14 END[/CODE] [CODE] case WM_INITDIALOG: RECT rc; GetClientRect(hwnd,&rc); break; [/CODE] I am … | |
i recently asked a on a forum how to handle the problem if a user pushes onto a full stack or pops from an empty stack on how to handle this problem..... my question is could anyone give a accurate example code of the first example he gave me below? … | |
when you make a .cpp file with just functions and call it your library, is it still proper to provide a .h file with it that has the functions prototypes in it? | |
I am trying to make a binary tree. I have a node with a field for data, yes and no. The problem I am having is that I need the yes and the no to point to a different node but I do not believe it is doing that. In … | |
Hi friends, I was understanding the concept of friend functions. I read in my book that there are two possible ways of "making friendship":cool: 1. Make a class a friend. 2. Make the method in a class a friend. I am able to write a code for the first point. … | |
I am trying to learn operator overloading by working on overloading >> for a matrix class to enable the key-board based input for a matrix by calling sth such as [CODE]Matrix M1; cin >> M1; [/CODE] The operator overloading part is given in the following [CODE]istream &operator>>(istream &in, Matrix &m) … | |
i need to place the correct functions .. the goal is to be able to add, delete, display dota heroes [CODE]#include<stdio.h> #include<conio.h> #include<string.h> #define N 3 typedef struct{ /*Place fields here.*/ }name; typedef struct{ /*Place fields here.*/ }hero; typedef struct{ /*Place fields here.*/ }hero_info; typedef struct{ /*Place fields here.*/ }hero_rec; … | |
Hello, I would really appreciate if someone could tell me what is wrong with this function. When I execute the program it returns the memory address and not the calculated average. I have not included the entire program, there is a sort function and scores are entered by the user … | |
Hi friends, One of my class member function is supposed to return an array of integers. Here's the function. [CODE]int* MyClass::getallVars() { int* a = new int; int b[] = { GetparentVar1(), GetparentVar2(), GetchildVar1(), GetchildVar2(), }; a=b; return a; }[/CODE] Is there anyway I can do this without the use … |
The End.