51,593 Topics

Member Avatar for
Member Avatar for oah1837

my problem is about checking the subject related to the user a text file structure as below: username_1 password subject_1 subject_2 subject_ n username_2 password subject_1 subject_2 subject_ n username_3 password subject_1 subject_2 subject_ n . . . username_m password subject_1 subject_2 subject_ n in my problem the user will …

Member Avatar for Ancient Dragon
0
83
Member Avatar for karlad

I have a vector I need to delete every third element 123456 12456 1245 125 15 1 [CODE]vector<int>::iterator iter = v.begin(); while( iter != v.end() ) for( int i = 0; i < v.size() +2 ; i++ ) while( iter != v.end() ) { if (v.size() != 1 ) ) …

Member Avatar for ArkM
0
86
Member Avatar for daviddoria

I have a "Tools" class which contains a lot of functions I commonly use. One is a parallel sort. I pass it a vector of Objects and a vector of indices, and it sorts the Objects and sorts the indices the same way (so the corresponding index is in the …

Member Avatar for Ancient Dragon
0
87
Member Avatar for Liszt

I have for example a ftp server with the address ftp.mywebsite.com On this ftp server I have a path: FileFolder\\file1.txt What I wonder is how it would be possible to connect to this ftp server and read/write to that file. Is there any good articles of how this is done …

Member Avatar for Liszt
0
1K
Member Avatar for valtikz

How can I add image before the label like a warning sign?? and how can I make bold the label?? Thanks! [code] OkCancelDialog::OkCancelDialog():Gtk::Dialog( "Clear all calls", false ){ Gtk::VBox * vbox = get_vbox(); Gtk::Table * table = new Gtk::Table( 2, 1, false ); Gtk::Label * label = new Gtk::Label( "Please …

Member Avatar for Nick Evan
0
88
Member Avatar for Jyncus

I'm attempting to read in various numbers and chars from a text file using ifstream. I've read through a lot of C++ File IO and can't see why my two int variables, numOfVars and numOfCNFs, aren't getting assigned in the Parser::BuildCQF() method. The code below shows my Parser.h, Parser.cpp, the …

Member Avatar for MrSpigot
0
114
Member Avatar for brandguru

Hey All I want to create a simple dice golf game in C# The basic idea is: A player rolls 3 random dice until they roll a double The number of rolls taken until a double is rolled is calculated and displayed on the console This is run 18 times …

Member Avatar for Poab9200
0
2K
Member Avatar for pockets88

i have to create a mini search engine given a directory of 50 documents and a set of sample queries. i need to include the documents in a hash table and search through the documents for the keywords in the queries.. i have no idea where to start... can anyone …

Member Avatar for Alex Edwards
0
148
Member Avatar for kenji

Hey, I have a program that has 5 files, 2 header files called: [icode] console.h screen.h [/icode] and 3 source files called: [icode] a2main.cpp screen.cpp console.c //not a typo [/icode] When I copy the [icode]main[/icode] from my a2main.cpp file to my screen.cpp my program compiles without a problem. But when …

Member Avatar for Ancient Dragon
0
299
Member Avatar for Adexter

Hi, Im working on a school project and could use some help. Im having trouble storing data in an array of structs. My program has to read student data from a file and store the information in a struct. Im having trouble passing my array struct into my fuctions, and …

Member Avatar for NathanOliver
0
125
Member Avatar for anoop sharma

i have created 27 cubes using opengl and c++ and assembled for rubicks cube but not able to write rotate function for a slice.how to do????

Member Avatar for Lerner
0
120
Member Avatar for Akis2000

ok i need a quick help here...... here it's my problem It's approximate value of Ï€ is 3.141592653589793 Below are five di fferent series which can be used to approximate Ï€: you can se the series here:: [URL="http://i44.tinypic.com/2ujtmxw.gif"]http://i44.tinypic.com/2ujtmxw.gif[/URL] ask which series he/she wants to use and the precision (number of …

Member Avatar for NathanOliver
0
125
Member Avatar for di mo

You have a necklace of N red, white, or blue beads (3<=N<=350) some of which are red, others blue, and others white, arranged at random. Here are two examples for n=29: 1 2 1 2 r b b r b r r b r b b b r r b …

Member Avatar for Lerner
0
207
Member Avatar for toolmanx

I have a simple program that I am having trouble debugging. It contains two different problems. 1. If I run a MessageBox in this program after the program is up and running, the program crashes. I have to call the Task Manager to shut down the program. 2. SetTimer will …

Member Avatar for MrSpigot
0
1K
Member Avatar for nschessnerd

Hey Im writing a program that needs to send data over http, sometimes 45 minutes between packets, sometimes 10 seconds. I noticed that when i shut the server down it sends a lot of fin packets... so i guess my socket logic is off... i dont have a lot of …

Member Avatar for nschessnerd
0
95
Member Avatar for asweetroxxi

i finished the program but the input of 0 and one is too much i want to know how to have it read from a file i understand i have to use inFile. open but where do i put it i put my whole program in the thread: #include <iostream> …

Member Avatar for tux4life
0
105
Member Avatar for dragonksn

Hi, I'm a new comer. Can anyone tell me how to [B]access to the audio streaming in Smart Device[/B] using [B]c++[/B] (for Pocket PC of Windows Mobile)? I would like to use it for my future speech recognition application. Thx for reply.

0
39
Member Avatar for RizzLinux1388

Hi, I'm doing a project where we make our own string class and I'm having trouble with the substring function. This is what I have so far. [CODE]string string::substr(size_type idx, int length) { // can use the += char somewhere string *someString; char *ch = _data; for(idx = 0; idx …

Member Avatar for RizzLinux1388
0
148
Member Avatar for Sam-J

hello everyone i am a fresh man in this site ... and i'm really pleased joining this lovely 'n useful one well .. i made a program in c++ which is all about natural merge sort on files , since i want to sort my file which contains a randomly …

Member Avatar for WaltP
0
407
Member Avatar for kailisr

I hope this doesn't come across as confusing. I am doing something wrong, with a "error C2059: syntax error: ';' - line 45; error C2059: syntax error : '/' - line 47. I'm not sure, but maybe it has something to do with the %, and that I didn't use …

Member Avatar for WaltP
0
147
Member Avatar for naheesa

hi, [COLOR="Red"]I need the answer as soon as you can[/COLOR] Write a c++ program that prompts the user to enter an integer number greater than Zero (0) and prints a multiplication table up to that number. The program should display an error message an and loop until an accepted value …

Member Avatar for siddhant3s
0
150
Member Avatar for mathueie

Hi How to get cpu utilization of particular process without using top command. I want programmatically C or C++.Top command source is large.I can't analyze where %cpu usage got. Anyone help me...........

Member Avatar for Ancient Dragon
0
100
Member Avatar for DJ-KhaosTheory

Greetings fellow coders, I am using the Playsound() function for playing music or sounds in my console based C++ application. I have a few brief questions that I need answered before I can continue. 1. When using the Playsound() function, how do you set the volume level? 2. How do …

Member Avatar for Martin Skibye
0
2K
Member Avatar for gretty

Hi, can you help me just write an algorithm (not coding) to solve to this task. I have to write a program that takes in 3 points on a graph & determines if they form a [B]right-angled triangle[/B]. More detail below. [B]Can you give me some advice on how to …

Member Avatar for siddhant3s
0
1K
Member Avatar for hypernova

I am doing B.Tech in computer science and I am in the 1st year (I have almost completed 1st year) I want to learn a language in the forthcoming summer break (2 months) between the first year and second year, and am quite confused if I should go for [U]C++ …

Member Avatar for Narue
0
146
Member Avatar for delifion

Hi, I got homework about tree data structure professor wrote his own tree stuff which are: binnode.h and bintree.h the actual file is tree.cpp binnode.h [code=c++] #ifndef BINNODE_H #define BINNODE_H #include <math.h> #include <iostream> /*******************************************************\ template node class for binary tree \********************************************************/ template <typename dataType> class binNode { private: dataType …

Member Avatar for delifion
0
140
Member Avatar for Xamas
Member Avatar for Peter_APIIT

Hello to all, i try to code the binary exponentiation algorithm but unfortunately it is not working as desire. I decided to switch back to You could try using std::numeric_limits<int>::digits to determine the values and sizes or using CHAR_BIT. My logic is define at below. Look at most significant set …

Member Avatar for Peter_APIIT
0
901
Member Avatar for luvsom

I've been struggling with this for days now...... Say the number entered is 12345 If the user wants to find the value of the 4th digit, which would be the 2....how can I do this???

Member Avatar for WaltP
0
129
Member Avatar for denis1401

What is the best way to do system wide user mode (NOT KERNEL MODE) api hook on Windows NT?

Member Avatar for MosaicFuneral
0
83
Member Avatar for tgsoon2002

As I read some tutorial, I just get the idea to input to the file totally replace, overwrite or continue at the end. I wonder any code that in put text in the middle like this brown || I want a V dog.

Member Avatar for tgsoon2002
0
265
Member Avatar for sabian4k

I know I don't have much done, but I am really stuck and my grade does ride on this. I have used this website to write my other problems please help. I know I have the inputof the intergers wrong. and the program is due tomorrow. please help! [code] //************************************************************** …

Member Avatar for tux4life
0
175
Member Avatar for blackhawk9876

I am having trouble writing these recursive functions. I know I am on the right track, but also know that these functions are not right. Any help would be appreciated. Given the following declarations for a linked list: [CODE]struct NodeType; struct NodeType { int info; NodeType* link; }; typedef NodeType* …

Member Avatar for siddhant3s
0
110
Member Avatar for kiwihaha

>main.cpp [CODE] #include <cstdlib> #include <iostream> using namespace std; #include "function.h" int main(int argc, char *argv[]) { struct AXEMAN{ int lvl; int att; int hp;}; struct DEFENDER{ int lvl; int att; int hp;}; struct ARCHER{ int lvl; int att; int hp;}; struct SPEARMAN{ int lvl; int att; int hp;}; struct …

Member Avatar for kiwihaha
0
153
Member Avatar for Liszt

I have a general question about how it would be possible to protect a software from copying. I have done a software that will be able to download from a website, the user will install the software on his/hers computer. How could it be possible to protect this software from …

Member Avatar for Liszt
0
104
Member Avatar for waehake

to start off thanks for the help in advance, im trying to make a program that calls a function that i input integers into, then calling another function to calculate the total of the numbers entered. here is my source code: [code=cplusplus] #include <cstdlib> #include <iostream> using namespace std; const …

Member Avatar for NathanOliver
0
115
Member Avatar for emanmae

So i have this homework assignment and im having a problem figuring out how to get the numbers from this file and finding the agerages. heres what i got so far. [CODE]#include <iostream> #include <iomanip> #include <fstream> #include <string> using namespace std; int main () { // Declarations string reply; …

Member Avatar for emanmae
0
188
Member Avatar for Erroneous Seth

Hello to everyone, I am having this problem with the following code: [code] typedef struct test { int i; char c[50]; } testStruct; int main() { char *pData; testStruct t; t.i = 5; strcpy_s(t.c, 50*sizeof(char), "hello"); pData = (char *)malloc(sizeof(t)); memcpy(&pData, &t, sizeof(t)); testStruct a; memcpy(&a, &pData, sizeof(t)); cout << …

Member Avatar for Erroneous Seth
0
246
Member Avatar for NathanOliver

Hi have made some code that will generate alphanumeric passwords and output them into a file. Each password size has its own function so i have 16 functions for sizes 1-16. The code works great its just that as you go up one size in the password size it will …

Member Avatar for NathanOliver
0
89
Member Avatar for sabian4k

what exactly is mean by paper to pencil algorithm and what is it? I am doing a program where two numbers are stored in an array, and are reversed in the array, and I need to add them together, how do I go about doing it with paper to pencil …

Member Avatar for siddhant3s
0
204
Member Avatar for tgsoon2002

Can i have some example for "if string is found" I have no idea what syntax for this. compare, find or seek or what else i don't know?

Member Avatar for boblied
0
66
Member Avatar for BlackStar

from the pointer problem thread. I got this, [ICODE]void is_valid (char& s) { return s=='1' || s=='2'; } void is_submenu(char& m) { return m=='x' || m=='y'; } // then i'm using it in my main. char choice; cout<<"enter your choice"; cin>> choice; if( is_valid(choice) { if(letter == '1') { // …

Member Avatar for BlackStar
0
229
Member Avatar for Adexter

Hi, im working on a project for school and Im having a little trouble. The problem states: Write a program that reads students names followed by their test scores. The program should output each students name folloed by the test scores and the relevent grade. It should also find and …

Member Avatar for Adexter
0
2K
Member Avatar for asweetroxxi

i have the shell of the code but im have some trubble i need to write the function that lets the user input a zero or a one. it have to be done in a loop the shell is shown: [code] #include <iostream> using namespace std; int const MAX_ROW=10; int …

0
149
Member Avatar for smyth9957214249
Member Avatar for tux4life
0
62
Member Avatar for ganmo

Hello, This is probably a simple question. I have a class A, and a class B, class C class... which inherits from class A. Now I want to store it in a container e.g. vector [CODE=cpp] vector<*A> container; [/CODE] I have also created some objects of B and C, and …

Member Avatar for ganmo
0
114
Member Avatar for lilballeer

hello, I am trying to change my current code to include the following class definition. class studentType { private: string studentFName; string studentLName; int testScore; char grade; public: void getData ( ifstream & inFile, studentType sList [ ], int size ); void calcGrade ( studentType sList [ ], int size …

Member Avatar for vmanes
0
234
Member Avatar for Lukezzz

I am trying to create a folder under the "HKEY_CLASSES_ROOT" in the Registry Editor. I run this code but I cant find that "TestFolder" was created here. I wonder if I am doing this correctly ? [code] Microsoft.Win32.RegistryKey Test = Microsoft.Win32.Registry.ClassesRoot.CreateSubKey("TestFolder"); [/code]

Member Avatar for Lukezzz
0
137
Member Avatar for sabian4k

hey guys i'm stuck big time, i need some major help. [code] // ************************************************************* // This program adds large integers that are stored in arrays. // The digits are stored in the array in reverse order so that // addition is easier. The program allows a user to keep doing …

Member Avatar for Salem
0
105
Member Avatar for Audette

Hi, I am currently running some C++ code in Windows. I am using Code::Blocks with mingw therefore using the gcc compiler. Can anyone tell me, is thespeed of execution of the final .exe file dependant on the compiler? e.g. will the speed change if I use Visual C++ 2008 Express …

Member Avatar for GDICommander
0
293

The End.