49,764 Topics

Member Avatar for
Member Avatar for PuQimX

i have problem with my code to search node in link list. can anybody help me? sorry for my english.. node *temp1; // create a temporary node temp1 = (node*)malloc(sizeof(node)); // allocate space for node temp1 = head; // transfer the address of 'head' to 'temp1' bool find = false; …

Member Avatar for deceptikon
0
224
Member Avatar for Mosey Mo

When the score is greater than 100 points the program should ask me whether the score is correct The program should ask me whether the score is correct. The program should not add a score that is more than 100 points to the accumulator with out permission (if(score > 1000 …

Member Avatar for Zaqmjua
0
103
Member Avatar for Zaqmjua

#include <iostream> #include <string> using namespace std; int main() { string s; for (int i=0; i<10000; i++) { s+=1; for (int j=0; j<i; j++) {s+=0;} } cout << s; } This is a code i wrote to make s=110100100010000... until 10 to the power of 10000. However in the line …

Member Avatar for deceptikon
0
122
Member Avatar for arn2025

I have a list of about 500 names in a text file, i want to be able to get 5 random winners from this file. using C++ how do i do this

Member Avatar for Banfa
0
92
Member Avatar for MasterHacker110

With what programming languages can you write OS in. I know that you can use C and C++ but are there any other, when i talk about OS i mean everything: from the BIOS & Boot & Kernel & all the rest that is neede to make an opersting system …

Member Avatar for mike_2000_17
0
139
Member Avatar for ItsAdZy

Pretty stumped on why I am getting so many errors trying to get this to work, the reason terminalArray is not declared is because this is a function, terminalArray was declared before main. Any help will be greatly appreciated! int histArray[10]; int i; int j; while (terminalArray >= 1 && …

Member Avatar for ItsAdZy
0
224
Member Avatar for ponnds

this is my server code i want to receive more than 1000000 bytes ,so the data should be splited into many packets so i use loop to receive all data ,if i use like this server always wait for client even client sent all data to server ,my messsage is …

Member Avatar for Banfa
0
2K
Member Avatar for TheWind147

Hi! I made a program that accepts random numbers, create a binary tree from it, then traverse it using in-order, pre-order and post-order traversal. The program is working well but my instructor added something else, when the user input numbers, it should be arranged just like an actual tree. The …

Member Avatar for TheWind147
0
4K
Member Avatar for jeanbarca

Hello guys i am writing a c++ code that should do the following: 1- Creating a stage group just like the champions league first round consisting of 4 teams each on has 4 attributes ( points, gf, ga, gd) 2- The user must be asked to enter each team name, …

Member Avatar for jeanbarca
0
306
Member Avatar for pce369

I wrote a linked list program in C++ which compiles and works well. But I have been told that a) I have to have two separate structs instead of one that contains both the info and the node; and, b) that I have to use two pointers instead of the …

Member Avatar for Labdabeta
0
429
Member Avatar for jigglymig

I think I am comparing something incorrectly since it does take in my input and tells me no shortest path.. here is example input and output... 5 7 0 1 1 0 2 2 1 3 6 1 4 4 2 3 5 2 4 7 3 4 3 you …

Member Avatar for jigglymig
0
202
Member Avatar for MR_88

Hi guys, I'm trying to use the random number generator as part of the GSL library and it is working fine for a few hundred 'rounds' of my code (it is used quite a few times per round) but then i get an error message in the command window: [CODE]gsl: …

Member Avatar for zp0402
0
1K
Member Avatar for gethelpcpp123

I have to write a program that checks whether a sentence is a palindrome or not.I had no problem checking a word, but checking a sentence that contains spaces and quoatation marks made results incorrect. Basically to solve the problem and ignore the spaces and marks, I copied the initial …

Member Avatar for Labdabeta
0
220
Member Avatar for SAM2012

Hi All, I am working on a program where I want to keep the length of message in bytes to further working on it. the message got this string in it. [CODE] message^ m = gcnew message("usa.weather");[/CODE] I have to keep the length of this argument that is routing key …

Member Avatar for WaltP
0
175
Member Avatar for Tygawr

Hello, I want to learn how to make a syntax highlighter in vc++ 2010. What should I do?

Member Avatar for WaltP
0
61
Member Avatar for nekoleon64

This is embarrasing. My name is Leonard Norwood Jr. And I have problem concerning my program that does a simple program of multiplying a person's weight times the weight of the planet equals the weight they would be if they were on a planet. And this has to be done …

Member Avatar for HWalkmanWTN
0
173
Member Avatar for angrymasteryoda

Ok now i am having a retarded issue im sure. but here is what is supose to happen is n is not allowed to be more than 5 but when i run this and enter in 5 i get a blank space and when i enter 1-4 i get the …

Member Avatar for WaltP
0
142
Member Avatar for Tygawr

How can I read a string within a string without using substr? void ReadStrInStr() { string Str; Str = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; //cout "A-J" in Str }

Member Avatar for WaltP
0
281
Member Avatar for gethelpcpp123

A password is good if it has at least one digit,one alphanumeric charecter, one uppercase letter, one ordinary lowercase letter letter and consists of 8 charecters or more. I created this program, but I'm not getting correct results.. What is the problem? void main() { cout<<"This program checks whether the …

Member Avatar for WaltP
0
109
Member Avatar for Labdabeta

I never knew that near and far were reserved until I made a struct for bounding boxes like this: struct boundingBox { float near, far; float left,right; float top,bottom; }; Does anybody know what near and far do, because I got the error that the declaration does not declare anything. …

Member Avatar for Labdabeta
0
120
Member Avatar for c3r3alki113r

# Source Code # robo.h - http://pastie.org/3698136 main.cpp - http://pastie.org/3698145 functions.cpp - http://pastie.org/3698148 # Glitches # When ever i try to create more than 2 instances of the class Robots the program will compile but crash it is crashing during construction right after the first while loop, i would think …

Member Avatar for c3r3alki113r
0
202
Member Avatar for jerryjerry

Hi all, I have implemented overloaded function for operator new. In this function I have not allocated any memory still while exiting from program it is getting crashed. Code is as below: class A { public: int a; int b; A() { cout<<"Inside A::A()"<<endl; } void* operator new(size_t s) { …

Member Avatar for L7Sqr
0
239
Member Avatar for beginneronce

Hey guys, i am a beginner in c++ and i don't know what's wrong with my code. i'dont get any errors, but when i run the programme the following: "... Line: 251 Expression: vector iterators incompatible ..." I think there is a problem with "b.getmark()" and "b.getcoursename()" but i don't …

Member Avatar for beginneronce
0
716
Member Avatar for RainbowMuffin

Hello, I'm fairly new to C++, and i would like to know how to make a program that uses IO stream? like, i want it to have settings feature where the user would enter thier info on a form, and it saves as a .txt or another format file, and …

Member Avatar for thines01
0
139
Member Avatar for mc3330418

I have a header file. #include <iostream> class coinReturn { public: coinReturn(); coinReturn(int quarters, int dimes, int nickels, int pennies); void setChange(int quarters, int dimes, int nickels, int pennies); void getChange(int& quarters, int& dimes, int& nickels, int& pennies); void print (); private: int countQuarters; int countDimes; int countNickels; int countPennies; …

Member Avatar for mc3330418
0
342
Member Avatar for praveenjain
Member Avatar for Lusiphur
-2
78
Member Avatar for TheFearful

Hey guys, I don't know where to get started in this. I pretty much only have the header file and I don't even know if that is correct. I don't know what the question is asking other than it is asking me to open up a text file. Any suggestions? …

Member Avatar for rubberman
0
167
Member Avatar for Tygawr
Member Avatar for pattmorter

Hey everyone. I just finished a cross product calculator program for the fun of it trying to test stuff outside of my rage of knowledge. I tried a couple new things like strings and cin.fail() so if someone would read over it and tell me what I did right/wrong that …

Member Avatar for pattmorter
0
287
Member Avatar for NachoLobato

I have to create a game, in which the computer chooses randomly a word out of 5 and randomizes its characters, so that the user has to guess the word. He can also get a hint of the computer. I have started the code, but dont know how to continue: …

Member Avatar for Ancient Dragon
0
218

The End.