51,593 Topics

Member Avatar for
Member Avatar for Infame

Hi! I'm currently making a HTTP protocol bot, it works somewhat fine with a fixed char array, but once there's a website that exeeds 8k, then it cuts off. If it's less, I get weird nonsenscial symbols... Is there a way to know the length before assiging the data to …

Member Avatar for Ancient Dragon
0
157
Member Avatar for memomk

well i have two questions: 1-hey i was wondering is there a library or namespace in c# for creating databases? like anydbm with python?or anyway to do it? 2-witch faster? getting data from huge database or getting it from like a huge database devided to multi database i mean witch …

Member Avatar for faizan11
0
206
Member Avatar for cresenia1988

Inside the infile.txt, I'm suppose to convert into outfile.txt. Unforunately, I'm unable to get the correct aglinment for outfile. As you can see, France and Vietnam have an extra "\t". char ch; switch (n) { case 'F': stud.type = n; infile >> stud.st.fs.country; infile.get(ch); infile.getline(stud.st.fs.name, MAX); break; case 'S': stud.type …

Member Avatar for muze
0
134
Member Avatar for SillyNoob

I'm at an absolute complete loss with this. I'm a using a pointer-pointer to "remember" the last node of a linked list so a function in the loop can add another node and then return the address of that new node so it's known for the next loop. Sounds easy, …

Member Avatar for SillyNoob
0
93
Member Avatar for MasterHacker110

i have this c++ code and i wondered how ot would be in c #include <vector> // for vector #include <sstream> // for stringstream #include <iostream> #include <string> using namespace std; int main() { stringstream ss; string input, temp; vector<string> comand; cout << ">: "; getline(cin, input); ss << input; …

Member Avatar for MasterHacker110
0
172
Member Avatar for SCass2010

Hi everyone, Again, I'm just trying stuff out to try and learn a bit more but here goes... I created a small Logger util - I included the pthread library and added a mutex lock in each of the "write*" functions, tested it by running a few instances of a …

Member Avatar for varungandhi
0
2K
Member Avatar for Panathinaikos22

Hello, where is the problem in this code? it seems ok but i get "unresolved external symbol " error" for Server::SetMode() :/ damn // Server.h class Server { public: Server(); static const int MODE_NONE = 1; static int SERVER_MODE; void SetMode(); }; // Server.cpp #include "Server.h" Server::Server() { } void …

Member Avatar for phorce
0
124
Member Avatar for FraidaL

I wrote this code to change all lowercase letters in a string to uppercase. That works, but I also want it to go the other way around and nothing I tried is working. #include<iostream> #include<string> #include<cctype> using namespace std; string change(); int main() { change(); return 0; } string change() …

Member Avatar for triumphost
0
163
Member Avatar for c++bob1234

NEED help with this code, i need to put the code in place of(??????) The code is suppose to enter the car's information and it compares which car has best finance mileage and cost of car. #include<iostream> using namespace std; #include<string> #define INT_MAX 100000 #define INT_MIN 0 using namespace std; …

Member Avatar for thines01
0
246
Member Avatar for piyush3dxyz

I just develop a simple C++ program which gets data from user and make in database form and save it to file... compile it and share your review... /*simple Database application Programmed by Piyush gautam email-piyush3dxyz@gmail.com */ #include <iostream> #include <conio.h> #include <fstream> #include <stdio.h> using namespace std; struct work …

Member Avatar for sfuo
1
12K
Member Avatar for tadamagic63

#include <iostream> #include <iomanip> #include <string> using namespace std; // Constants const float RESLINEFEE = 22.42; const float RESperGALLONfirst10000 = 2.42; const float RESperGALLONnext13000 = 3.22; const float RESperGALLONover23000 = 4.03; const float COMLINEFEE = 22.09; const float COMperGALLON = 2.65; const float INDLINEFEE = 18.41; const float INDperGALLONfirst200000 = …

Member Avatar for scudzilla
0
185
Member Avatar for james6754

Hello I have this problem..I realise I am trying to I am calling function like this...a reference to E is passed in? B = D.sum1(E); MatrixClass MatrixClass::sum1(const MatrixClass &rhs) const//function to add elements of one MatrixClass to { //another and return the new MatrixClass MatrixClass C; if(this->dataptr == rhs.dataptr) { …

Member Avatar for StuXYZ
0
152
Member Avatar for Black Magic

[CODE]#include <iostream> using namespace std; int main() { char exit; cout << "Exit? Y / N " << endl; cin >> exit; if ( exit == 'Y' || exit == 'y' ) { } if ( exit == 'N' || exit == 'n' ) system("PAUSE>nul"); else { } } [/CODE] …

Member Avatar for SamuelAdams
0
378
Member Avatar for memomk

sorry but i still cant understand what is different betweeen Thread and Process in c# what to use?

Member Avatar for memomk
0
108
Member Avatar for alanso

#include <iostream> #include <fstream> #include <string> using namespace std; int main () { string cosid1, cosid2; int no_cos=0, nostu1=0, nostu2=0; double score, total_1=0, total_2=0, avg_1=0, avg_2=0, avg_group1=0,avg_group2=0; ifstream group1, group2; ofstream outgroup; group1.open ("group1.txt"); group2.open ("group2.txt"); if (!group1 || !group2) { cout<<"Unable file"<<endl; cout<<"Programs terminates"<<endl; } outgroup.open("totalgroup.txt"); outgroup<<"Course ID"<<'\t'<<"Group No"<<'\t'<<"Course …

Member Avatar for nullptr
0
171
Member Avatar for Kulasangar
Member Avatar for James19142

i'm making this function that replaces single slashes in a path with doubles slashes. It works for everything but slashes because I gotta use doubleslashes to specify a single slash so how do I refer to double slashes. QString AddDoubleSlashtoPath(QString Path){ QStringList splitup=Path.split("//") ;/*supposed to be a single slash*/ QString …

Member Avatar for triumphost
0
1K
Member Avatar for abysss

hi everyone ! i am trying to write a program in c++ that can play video files(mp4,avi,mkv)...... but i have very little knowledge of handling video . It would be a great help to me if anyone could guide me through this or provide any tutorial links. Thanks in Advance …

Member Avatar for muze
1
68
Member Avatar for muze

hello guys.. I am trying to make a simple tab control dialog-based application. Well I succeeded to do so. But I am facing problem in recieving data. I have put an EditBox onto the dialog (used for the *Tab Client Area*) but it is not giving the values back. Here …

0
71
Member Avatar for alanso

#include <iostream> using namespace std; struct student { char name [50]; char S_code [5]; int fees; }; void display(struct student); double input(struct student&); int main() { double total; student stu; total=input(stu); display(stu); input(stu); return 0; } double input (struct student&stu ) { double total=0; char again ='y'; cin.getline (stu.name,50); while …

Member Avatar for alanso
0
199
Member Avatar for samiam5976

Hello, *'m trying to complete a homework assignment using a bool type array to find the prime numbers from 2 to 1000 based on the sieve of Eratosthenes. The code I've included below will find the prime numbers, but skips the first 11 primes (2, 3, 5, 7, 11, 13, …

Member Avatar for samiam5976
0
113
Member Avatar for caltech

My whole code is below. I need to print an alphabetically sorted list towards the end right now, that's where I'm at... you can see my measly attempt, but I clearly don't really know what I'm doing with this sorting algorithm... Do I need to make a new vector comprised …

Member Avatar for Lerner
0
613
Member Avatar for coroche

I'm trying to write a code to take in strings of "Name Surname City" separated by spaces which are then sorted alphabetically first by city then surname then name. I have it as far as extracting the idividual elements of the string but don't know how to implement the bubblesort. …

Member Avatar for coroche
0
140
Member Avatar for benclifford

I have done this code 5 times in my program for different classes and variables and it has worked fine for 4 of them but the 5th is giving a segmentation fault. The error occurs just after the cout saying 'here' in the main.cpp code below I have run valgrind …

Member Avatar for benclifford
0
388
Member Avatar for SillyNoob

**IDE: **MS Visual Studio 2008 Professional **Compiler:** Unknown First off let me thank any of you who take the time to read this and reply back. I'm having a ridiculous amount of trouble returning a pointer from a function and then using that returned pointer to change the pointer-pointer in …

Member Avatar for SillyNoob
0
234
Member Avatar for Labdabeta

I have the following code to draw a scene to opengl, but nothing shows up, just a blank screen! void glCameraDraw(const LABglCameraHANDLE h, LABglWindowHANDLE LABglGlobals) { if (!h->isProjected)//check to see if h's projection is loaded { glMatrixMode(GL_PROJECTION); glLoadIdentity(); //LABglGlobals->LABglDimensions are the screen dimensions gluPerspective(h->fov,(float)LABglGlobals->LABglDimensions.right/ (float)LABglGlobals->LABglDimensions.bottom, h->front,h->back); h->isProjected=true; } //set the …

0
85
Member Avatar for Labdabeta

I need to calculate chi squared cdf from x->infinity with n=255 degrees of freedom. I cannot seem to get it to work. You can find formulae for chi squared distributions using google. Here is my non-functional approximation code: double riemannsum(double(*fnc)(double),double dx, double xmin, double xmax) { double ret=0; double x=xmin; …

Member Avatar for Labdabeta
0
619
Member Avatar for nicprog

can you explain how to chack all the char inside the array without check only the first and it says equal for(j=0;j<len;j++) { if (letter==copywords[j]) { //words[j]=copywords[j]; words[j]=letter; cout << "good guess: " << words[j] << endl; //correct } else if(words[j]==copywords[j])) /problem { cout << "done!!!" << endl; system ("pause"); …

Member Avatar for zeroliken
0
124
Member Avatar for subith86

Anybody of you got any idea what this "internal compiler error: Segmentation fault" means? I searched internet, but didn't get anything useful. Then I did my analysis. I found out something peculiar. The code that I am trying to compile is a file for unit testing one of our classes. …

Member Avatar for mitrmkar
0
3K
Member Avatar for don't give up

hello please help me it's important i want code c++ convert from array to another " example: **user enter : acb** array1[0]=a array2[0]=1 and array1[1]=b array2[1]=2 array1[2]=c array2[2]=3 **out put for user : 132 ** thanksthankthanthatht

Member Avatar for don't give up
0
186
Member Avatar for anonymous1987

Need help, trying to perform arithmetic operations using words, so far i've got to the stage where if the user enters a number in words with the operation type eg(one + six), the result is printed out as an int. But i am unable to convert this int back to …

Member Avatar for Lerner
0
176
Member Avatar for jara33

Hi, I need to do this program in my university and I was wondering how can I do it so that when there are no exits available, the program just says "type q to quite", and skips the 'Type the first letter of the next step or direction you want …

Member Avatar for zeroliken
0
161
Member Avatar for MasterHacker110

I need help with a program i am writing. It takes in a line from the user and then decides wat to do. there are to many options to spesify. some of the options are: set TARGET 453.212.556.22 This command will differ becuase the host will never be the same. …

Member Avatar for MasterHacker110
0
274
Member Avatar for ddm

Design a CPU Timer class (you may name it CPUTimer). This class should allow the user to start timer, stop timer, compute delta time and print the lapsed CPU time of any block of code in a program. #pragma once #include <iostream> #include <cmath> #include <ctime> #ifndef CPUTimer_h #define CPUTimer_h …

Member Avatar for mike_2000_17
0
154
Member Avatar for visitor11

why is it "ur project is out of date" when i try to run cpp file opencv on vbs 2008

Member Avatar for Ancient Dragon
0
171
Member Avatar for Daffodil_Thursday

I am writing a quiz program in C# in Visual Studio. When I build it it doesn;t return an errors or warnings. However when I debug, it just brings up a blank screen with no text or buttons etc. I have tchecked all the names match those in the forms …

Member Avatar for thines01
0
231
Member Avatar for Nawaf15

Hi everyone, I have been having problems with this code. I can't figure out how to get it to sort items alphabetically. Another problems is that the code never reads items from disk, but I can't figure out where the problem is. I hope you guys can help me. #include …

Member Avatar for histrungalot
0
205
Member Avatar for James19142

This app I finally got the splashscreen to the way i want it, but when I run the .exe from the explorer the splashscreen loses its transparency and has a white background replacing the glow; In when the compiler runs it directly after it builds it look exactly how it …

0
117
Member Avatar for triumphost

I have a class that just creates a blank bitmap it's quite large so I removed a LOT! of code to make it easier to see my problem. No knowledge of bitmaps required. I declared "Pixels" as an array of RGB but in one function, Pixels is empty whereas in …

Member Avatar for triumphost
0
226
Member Avatar for simagen

I am (trying) creating a program with C++ to RESTORE A SHUFFLED IMAGE. The program will be used to restore the original image from the standard original pic that has been shuffled, and will also be tested with the shuffled picture that has graphically edited with a NOISE effect this …

0
53
Member Avatar for Nawaf15

Hi everyone, I'm just trying to get this address book to sort the names alphabetic lly but I could not figure it out. I know I will add an extra case with a unique letter but where do I define the function? One more thing, my code is having some …

Member Avatar for Nawaf15
-1
182
Member Avatar for ashboi

int isaMUstring(char* sequence, int size) //function isaMUstring(char* sequence, int size) { int i,j; for(i=0; i<size; i++) { if(sequence[i]=='M'||sequence[i]=='U'||sequence[i]=='I') j=1; else j=0; } return j; } int canApplyRule1(char* sequence, int size) //function canApplyRule1(char* sequence, int size) { if(sequence[size-1]=='I') return 1; else return 0; } int canApplyRule2(char* sequence, int size) //function canApplyRule2(char* …

Member Avatar for scudzilla
0
136
Member Avatar for ChaseRLewis

So am doing a run down of different 3DMath Libraries. I am noticing functions with return types are HORRIBLY inefficient compared to void returns. I decided to do a rundown of how move constructor/assignment effects this. Well having a move constructor is seeing an average of 3.5-4x improvement, but doing …

0
62
Member Avatar for nuclear

I had this talk with a friend a while back and now i remmember that he said that C# is like a newer version of C++, but i think thats not correct, since C, C++, C# is kinda all oriented in this or that, what do you guys think of …

Member Avatar for mike_2000_17
0
162
Member Avatar for MasterHacker110

I am writing a game. The game will be controlled by the cmd, it is like a hacking game. You type: run exploit545.exploit www.tktktk.switchnet and it will exploit that exploit at the targeted computer (url). My problem is i cant seem to find a way to make the program read …

Member Avatar for MasterHacker110
0
152
Member Avatar for caltech

okay so here's my code but i knwo there's just something so wrong with the second/youngest one. the first/oldest part works though. int oldest = 0; // Determine and print oldest employee(s): for (int i=0; i<recordlist.size(); i++) { if (recordlist[i].age > oldest){ oldest = recordlist[i].age; } } cout << "Oldest …

Member Avatar for NathanOliver
0
948
Member Avatar for minghags

Hello! I just want to ask you guys if anyone can help me reedit my program from BFS to DFS. I know how BFS works but i can't figure it out how to write the sintax. So i would please ask you guys if you could help me out. Heres …

Member Avatar for Labdabeta
0
451
Member Avatar for Yozuru

So I have a programming lab that we did in class for a few months but I am having major difficulity on it. These are the directions: > Specifications for Calculate grades using loops 1. Create pseudo code for your program first, to be handed in. 2. Make the program …

Member Avatar for FelineHazard
0
1K
Member Avatar for Kamina00

Hello I am learning templates and at the moment I have created a templated QuickSort function. It's rather short and self explanatory. However during the call to the QuickSort Driver function I get a No matching call error. I have detailed the error message in full at the bottom of …

Member Avatar for Kamina00
0
262
Member Avatar for jonajonlee

So in my class we are learning about strings. In this program, the goal is to reformat the text in a data file. sample data file: Here's a "TEST" file. (DateD 5 April, 2012) Will this #*PrOGRAM+=@ that includes !user-defined?!?> FUNCTIONS really work? Only time will tell............. My program needs …

Member Avatar for deceptikon
0
222

The End.