49,757 Topics

Member Avatar for
Member Avatar for billionair

I don't what's wrong with this simple piece of code I wrote. It keeps crashing. Output Screenshots: http://i.imgur.com/8xwet8m.png http://i.imgur.com/FXBa8YM.png #include <iostream> #include <stdlib.h> #include <conio.h> using namespace std; int main() { char *strg; cin>>strg; cout << "Hello world!"<< strg<<endl; getch(); return 0; }

Member Avatar for rubberman
0
398
Member Avatar for waqas.zafar.125

i have a problem regarding classes . i have been given two files vector.h and set.h the vector.h file is : #ifndef VECTOR_H #define VECTOR_H class vector{ private: int *array; int max_size; //max size of vector int elements; //total element in vector public: //initializes everything to zero/null DefaultVector(); //initializes the …

Member Avatar for rubberman
0
160
Member Avatar for farhanp

hey guys does any one has idea how to write a program which calculates all the characters in a sentence

Member Avatar for deceptikon
0
191
Member Avatar for nova37

i added libmysql.dll as resource to my project ID_LIBMYSQL RT_RCDATA "LIBMYSQL.DLL" Image view :: http://s18.postimage.org/bcpf2s9jt/Untitled.png now when i try to find it using findresource function , i get error code : 1812 mean resource not found HMODULE hMod = GetModuleHandle(_T("libmysql.dll")); HRSRC hRes = FindResource (NULL, "ID_LIBMYSQL", RT_RCDATA); // RT_RCDATA application …

Member Avatar for nova37
0
332
Member Avatar for ChainedHollow

I need to multiply 2 matrices together using threads to computer each element. Ive been working on it myself but Im stuck at this point and Im getting an error. Here is the code I have. Can someone help in explaining what is wrong here or how to correct it? …

Member Avatar for WannaDoRight
0
2K
Member Avatar for anukavi

Hi I have declared BYTE myKey[10]; and on executing the value stored in myKey is 0x9100 i need to do string compare this value with user defined value (9100) how can i do the comparison? i converted to int int tempkey = (int)myKey[i]; //(have put it in loop based on …

Member Avatar for ravenous
0
8K
Member Avatar for karandeepmalik

I was looking at the possible solution to synchronise a bounded buffer ( like queue) using condition variables and think that we probably need two condition variables to correctly implement the synchronisation, one condition varaible will have a queue where the consumer thread(s) will be waiting to see if the …

Member Avatar for rubberman
0
222
Member Avatar for triumphost

Why do I need a static class member? What are the advantages and disadvantages of it? Is there any way that I can have non-static member fuction without doing anything outside of the class (such as passing an instance)? class Control { private: HMENU ID; HWND Handle, Parent; std::string Class, …

Member Avatar for Ancient Dragon
0
306
Member Avatar for cppfml

This might be (in fact I can probably say it is) a really dumb question but it's been doing my head in since I've been looking at it. First off, I've been looking at C++ for a short time and it's confusing to me more than what Java ever was. …

Member Avatar for deceptikon
0
133
Member Avatar for James19142

I need to modify an object in a QVector. I'm the `[]` operator to point to the object, which is overloaded with a constant and a non-constant version. The problem I'm having is that I don't know how to specify the non-const version, so I get compile errors telling me …

Member Avatar for James19142
0
209
Member Avatar for murnesty

I'm designing a embedded system and we have to oftenly report system fault in different code module. So I decided to create a source file to keep the error log and I'm building a struct for that. So that, every module reporting the error log and store in a data …

Member Avatar for mike_2000_17
1
249
Member Avatar for Tujianis

Okay, so I am trying to figure out how to refernce an external file for a username and password This is a little game i am trying to make and i need help with this part When prompted, the user types in their username and password to register i want …

Member Avatar for NathanOliver
0
151
Member Avatar for helixkod

I have an XML file that is in this format: <root> Test string <Signature> WvZUJAJ/3QNqzQvwne2vvy7U5Pck8ZZ5UTa6pIwR7GE+PoGi6A1kyw==</Signature> </root> I was able to produce the SHA256 and produced a string by using the following: string CalculateSHA256(const string& input) { SHA256 hash; string digest; StringSource _(input, true, new HashFilter(hash, new HexEncoder (new StringSink(digest)))); return …

Member Avatar for plenty.groover
0
399
Member Avatar for daniel1977

I am having a hard time trying to run this excercise. This works great up until the direction to declare the member functions Once declaring romanType member functions protected: ___________________ class romanType class romanType { protected: void storeRomanInput(char RomanNum[25]); void convertToDecimal(char storage[25]); void printAsRoman(); void printAsDecimal(); }; I am unable …

Member Avatar for RonalBertogi
0
245
Member Avatar for Superfreak3

I'm looking for some C++ code or direction in writing some to close an app if it detects another instance running. Our little update utility writes a log file, which I'm thinking of using as the clue. I was thinking that before the second instance attempts to write to the …

Member Avatar for RonalBertogi
0
213
Member Avatar for k_arjun

When I try to find all subsets of a set using the following code, the iterator vit in the inner for loop of the getPowerSet function misses out on one element certain times. Can anyone tell me why? #include<iostream> #include<vector> #include<set> using namespace std; vector< set<char> > getPowerSet(const set<char> &given); …

Member Avatar for k_arjun
0
239
Member Avatar for disjes

Hi, i've got a list with nodes with this structure: private: char namefield[30]; char tam[3]; char type[1]; }; i want to find and element with the find function from alghorithm class but i want to do it with the namefield property of the item, the find function has an item …

Member Avatar for ravenous
0
145
Member Avatar for Man1919

Hi! I am Working on TimeCode Slate Project (Working with: Arduino Uno Rev. 3), Now I working on the led display(8 digit 7 segment) code. I'm trying to modify this timecode display code from: "Dan Thompson - Timecode Based Stopwatch" http://danthompsonsblog.blogspot.co.il/2008/11/timecode-based-stopwatch.html to work with led display (Originally, the code from …

Member Avatar for Man1919
0
399
Member Avatar for ankit.4aug

Hello..i tied a lot but i am not able to get the answer.. i am writing a program in which user input the array with space as delimiter eg- 4 3 5 2 3 so this value should be stored in array as a[0][0]=4 a[0][1]=3 a[0][2]=5 a[1][0]=2 a[1][1]=3 a[1][2]=0 please …

Member Avatar for tinstaafl
0
497
Member Avatar for krissmwa05

you will write a program to solve linear equations given in upper triangular form. There are N equations, and N unknowns. This is equavalent to the following matrix multiplication [A][X]=[B], where A is a square matrix (N by N), X and B are vectors with size N. Back Substitution: First, …

Member Avatar for krissmwa05
-2
241
Member Avatar for ray.tan.507

I was doing some exercise from C++ Primer and one of them required us to copy a set of value from array into a vector container. Then, we are suppose to remove all the even numbers from the vector container. Hoever, when I tried to display them out by incrementing …

Member Avatar for Nick Evan
0
202
Member Avatar for asifalizaman

/*Calculator =========================program*/ /****************************************************************/ /*****************************************************************/ #include <iostream> #include <conio> #include <stdlib> /*****************************************************************/ /*****************************************************************/ float a[1000]; int top=0,i,r; char u; float input(); float d,p,q,w; void push(float x); void get(); void show(float arr[]); /***********************************************************************/ /***********************************************************************/ void main() { get(); getch();} /*-------------------------------------------------------------------------*/ /*-------------------------------------------------------------------------*/ void get() { cout<<"\t\tPlease Enter number\t"; for(i=0;i<1;i++) { cin>>a[i];} show(a); } …

Member Avatar for asifalizaman
1
268
Member Avatar for dreday92

I am having an issue implementing the Breadth First Search, Im trying to find the shortest distance between the source city and the destination city. Here is what I have so far, Im stuck and dont know what to do about this issue. #include <iostream> #include <string> #include <fstream> #include …

Member Avatar for dreday92
0
217
Member Avatar for billionair

#include<iostream.h> #include<conio.h> #include<string.h> #include<stdlib.h> #include"Student.cpp" void main() { clrscr(); int choice; student s; cout<<"MCA EXAM MANAGEMENT SYSTEM"<<endl<<endl <<"1. Login"<<endl <<"2. Register"<<endl; cin>>choice; switch(choice) { case 1 : clrscr(); cout<<"1. Student Login"<<endl <<"2. Teacher Login"<<endl; cin>>choice; if(choice==1) { s.studentLogin(); cout<<endl<<"back to main"; } else if(choice==2) { //Call to login function of …

Member Avatar for deceptikon
0
209
Member Avatar for gilangtitoe24011994

Hello friends, my computer suddenly have a problem when I uninstall the program Tune Up Utilites 2013, after finish uninstall that program, and then I restart, suddenly theme of my computer back to classic mode and out notice as: Debug Assertion Failed ! ----------------------------------------------------------------------------------------------------------------- Program: C:\Program Files\Lenovo\Energy Management\Energy Management.exe File: …

Member Avatar for deceptikon
0
2K
Member Avatar for chocolatte.lavista

#include <iostream.h> double box_area(int); double box_vol(int); void main() { int l,w,d; double a,v; cout<<"length : "; cin>>l; a=box_area(l); cout<<"area : "<<a; cout<<"width : "; cin>>w; a=box_area(w); cout<<"area : "<<a; cout<<"length : "; cin>>l; a=box_vol(l); cout<<"volume : "<<v; cout<<"width : "; cin>>w; a=box_vol(w); cout<<"volume : "<<v; cout<<"depth : "; cin>>d; a=box_vol(d); …

Member Avatar for asifalizaman
0
355
Member Avatar for pamela.barabutirei

failing to install codeblocks on my machine , running windows 8. its saying the program cannot be verified.....anything to help please!

Member Avatar for CodeWeaver
0
203
Member Avatar for harry.lloyd.7503

Hi guys/ and the minority of girls. This topic is for my teacher, who has asked me to find information of the following for himself. How can he interface a USB port to run a motor through C++? He is relatively good with computer systems himself, so why he does …

Member Avatar for MandrewP
1
252
Member Avatar for clapton

Hello everybody, This is parking program .I defined 4 task (keyboard,enter vehicle,exit vehicle,display) The program is compile but when I run it and press keys (E,S,F), it does not work. This program is written for linux. Can you help me? #include <stdio.h> #include <unistd.h> #include <sys/types.h> #include <stdlib.h> #include <pthread.h> …

Member Avatar for plenty.groover
0
108
Member Avatar for craig.durnin.1

Literally, I have been asked this question ""The Fibonacci sequence is 0, 1, 1, 2, 3, 5, 8, 13, … ; the first two terms are 0 and 1, and each term thereafter is the sum of the two preceding terms – i.e., Fib[n] = Fib[n – 1] + Fib[n …

Member Avatar for plenty.groover
0
2K

The End.