49,761 Topics

Member Avatar for
Member Avatar for brickbuilder

Hi ! I'm trying to learn about sockets using winsock in c++. What I want to do is have one computer (my computer) act as a mini server for my friend to connect to directly from his house (different ISP). I am wondering if it is possible using sockets to …

0
141
Member Avatar for Lama1

Hello .. Afternoon, happy, I have a test tomorrow and I want your help in the creation of code: we would like to counter and find the maximum , Minumum for linked list ? PLZ help me :)

Member Avatar for sfuo
0
31
Member Avatar for fishsticks1907

I get an infinite loop if i enter a char/string during the switch statement, so i made an exception to catch anything other then integers. But, i still get the infinite loop. I may be doing something wrong so any help would be great. [CODE] #include <iostream> #include <string> #include …

Member Avatar for fishsticks1907
0
264
Member Avatar for jeevsmyd

[code]for(int i=0;i<=c;i++) { l=0; if(strcmp(findedge(tst[i],dfa[0][j]),"null")!=0) { strcpy(t1,findedge(tst[i],dfa[0][j])); //l=strlen(temp); strcat(temp,","); strcat(temp,t1); //temp[l+1]='\0'; //temp[l]=','; } } [/code] When I try to append comma or some other symbol to temp, a segmentation fault occurs. If that step is omitted everything works perfectly. This is code is from my program to convert NFA to …

Member Avatar for Ancient Dragon
0
239
Member Avatar for Philip435

Hi, why does the two functions factorial and factorial2 only return the right factorial if the input is 12 or less ? [CODE=c] #include "iostream" using namespace std; int factorial(int n){ if (n==0){ return 1; } else{ return n*factorial(n-1); } } int factorial2 ( int x ) { int p …

Member Avatar for VernonDozier
0
83
Member Avatar for jyu

i store student information(name grade mark) in database....how to print student who score less than 50.0 mark and who score A ,Compute the average mark of students in the class, number of students who scored less than 50.0 marks,Print out the information for all ten students and Given a student …

Member Avatar for zeroliken
0
203
Member Avatar for sinrtb

In your opinion what is the fastest c++ compiler? I have found the gnu's compiler on my schools linux machines tobe very fast but i personally prefer the windows enviroment, is there any fast compilers for windows , something faster then g++ and mingw?

Member Avatar for Jimmeny
0
430
Member Avatar for anthony143

[B]Hi, guys can you help on how to make a program which hotel management system using C++? I don't know where to start or could you pls post the source codes in a simple structure so that I can understand it easily I am an I.T student here in the …

Member Avatar for sawako
0
159
Member Avatar for mokoton

i am a beginner in c++ and i am looking a web that is like a wiki for c++ that have information on every or most functions,variable and other in c++

Member Avatar for mike_2000_17
0
189
Member Avatar for Labdabeta

How do you make shadows in OpenGL. I have been using the NeHe tutorials, but I do not understand their shadow lesson. Can anybody help?

Member Avatar for mike_2000_17
0
374
Member Avatar for hey.howdy

[CODE] // a code to produce matrix style affect #include "stdafx.h" #include<iostream> using namespace std; int modulus(int Number, int number); char getchar(int lowerlimit, char a, int upperlimit); int modulus(int Number, int number) { int q=Number/number; return Number-(q*number); } char getchar(int lowerlimit, char a, int upperlimit) { return (a+modulus(lowerlimit,upperlimit)); } int …

Member Avatar for histrungalot
0
207
Member Avatar for evanovan

i have an "add function" that adds names alphabetically to a sorted linked list. the list is already made in this format : Dani Web Mark Markos Michael David Zebra Zebra . . etc if i add a node : adam ( it goes to the end of the list …

Member Avatar for evanovan
0
203
Member Avatar for HelpMe1234

I've got this intro C++ class and I can't figure out what the teacher is looking for, please Help Me if you can. 1) Each group turned in pseudocode for an in class project with five or six steps to run a baseball game. You are to turn the pseudocode …

Member Avatar for HelpMe1234
0
266
Member Avatar for Prisms

Hey guys I'm doing a fun little program that will use the character roster from league of legends. Basically I am going to have all the champion data like health, attack power, and type (early, mid or late game) stored and then compare the characters and depending on what the …

Member Avatar for Prisms
0
203
Member Avatar for SgtMe

Hi all. I'm using DragonFireSDK to make an iPhone app, which means that I can't use any external libraries other than the SDK one. I am trying to get an integer variable for score to a function which will display text on the screen. However, that function takes a char* …

Member Avatar for Ancient Dragon
0
402
Member Avatar for koricha

Hello i need help with a program which allows the user random read access to any entry of the array. If the user attempts to read outside the useful region, your data structure should return a 0. Also It allows the user random write access to the useful region only. …

Member Avatar for koricha
0
150
Member Avatar for Rbroke

Would appreciate any help on the attached code to get it to function properly. Think I am having a brain fart or the brain is completely fried at this point. Thanks! The program is to take an input string and outputs the series of International Civil Aviation Organization Alphabet(ICAO) words …

Member Avatar for Rbroke
0
119
Member Avatar for angelineang

I need to do a chem quiz that contain a science calculator n a small game,but there is some problem,got any idea? [CODE]#include<stdio.h> #include<math.h> #include<stdlib.h> #include<time.h> #include<windows.h> int main (void) { int option,question,i,count,z=0; char choice,game,quit; int selection; float pressure,volume,number_of_mol,temperature; int exit; char answer1,answer2,answer3,answer4,answer5,answer6,answer7,answer8,answer9,answer10,answer11,answer12,answer13,answer14,answer15,answer16,answer17,answer18,answer19,answer20; int guess,jackpot=8; // SetConsoleTextAttribute (GetStdHandle (STD_OUTPUT_HANDLE), FOREGROUND_BLUE); …

Member Avatar for Ancient Dragon
0
301
Member Avatar for phorce

Hello, I have 2 massive matrix's and I need to compare one matrix with another.. Now, I have come up with a solution that takes a 5x5 block of the matrix1 and compares it with a 5x5 block of matrix2, this happens until the end of both matrix's.. I'm confused …

Member Avatar for phorce
0
114
Member Avatar for tom12

Hey folks in my program is to encrypt a string.i then declared a function outside of the program to preserve the spaces which have been encrypted. but i dont know how to return my function to the main program to output the encrypted string with the spaces. cheers guys hope …

0
60
Member Avatar for SgtMe

Bit of a noob question this. I am using a library which has this function: [ICODE]int TextAdd(int x, int y, char *text, int font);[/ICODE] I need to use this function to display a score. I have the variable [ICODE]int score[/ICODE] and I would like to put it into that function …

Member Avatar for SgtMe
0
10K
Member Avatar for aderogba08

I'm writing a program that generates random arithmetic questions, the user has 10 lifelines, I want my program to display the lifelines (no of chances left) at the rightmost corner of the console window without it being scrollable i.e. It doesn't move neither up nor down when scrolled. I dont …

Member Avatar for Ancient Dragon
0
49
Member Avatar for tom12

[CODE]#include <iostream> #include <string.h> #include <ctype.h> using namespace std; void Removespaces(char clear[], char cipher[],int x,int i); void Removevowels(char clear[],char cipher[],int x,int i); int main() { char clear[256]; char cipher[256]; int x,i; int opt; cout<<"Encryption (1) 0r Decryption (2):"<<endl; cin>>opt; cin.ignore(); if(opt==1) { cout<<" Enter a string(sentence):"; cin.getline(clear,sizeof(clear)); // calling the …

Member Avatar for tom12
0
145
Member Avatar for jeffw362

Hi, I'm having an issue in my program when I try to call delete in my destructor. Can someone take a look and see what I doing wrong? I've looked it over and over but I just can't figure out what's wrong. destructor code: [CODE] StudentRecord::~StudentRecord(){ // Destructor delete[] m_firstName; …

Member Avatar for mike_2000_17
0
192
Member Avatar for triumphost

How can I check if a template's parameter is empty? Or of a "certain type"? I'd prefer to check if it's empty or not rather than the type because if the wrong type is entered, it'd throw an error anyway.. But I definitely need to know if the parameter passed …

Member Avatar for mrnutty
0
4K
Member Avatar for evanovan

is there a manipulator in C++ that do that ? if not how can i cout my numbers formatted that way . if the number is larger than 999.99 i want to put a comma after the first 3 digits and after the 6 digits ..etc x = 99456 Example …

Member Avatar for evanovan
0
172
Member Avatar for hey.howdy

[CODE] // a code to produce matrix style affect #include "stdafx.h" #include<iostream> using namespace std; int modulus(int Number, int number); char getchar(int lowerlimit, char a, int upperlimit); int modulus(int Number, int number) { int q=Number/number; return Number-(q*number); } char getchar(int lowerlimit, char a, int upperlimit) { return (a+modulus(lowerlimit,upperlimit)); } int …

Member Avatar for histrungalot
1
125
Member Avatar for Hoff123

The code can do the talking. main.cpp [CODE] #include "test.h" #include <iostream> #include <string> #define NL "\n" //"NL" = "New Line"(move the pointer to the next line) #define SL "\n\n" //"SL" = "Skip Line"(move the pointer 2 lines) int main() { Cool_Object.cool_function(); return 0; } [/CODE] test.h [CODE] #ifndef TEST_H …

Member Avatar for ItecKid
0
223
Member Avatar for davi0011

Hi I was wondering why I have an error in this program every time I try to do a long encryption. For example, encrypting an ebook or long document. I only occurs in the advanced encryption and advanced decryption functions. I'm pretty sure it has something to do with memory …

Member Avatar for davi0011
0
350
Member Avatar for jaskij

I have to write an interpreter for tristate logic as a Uni assignment. I got most of the things down, like expression tree and such, there is just one thing that's bugging me, that is input, or a particular part of it. The thing is, in the expression there can …

Member Avatar for jaskij
0
110

The End.