49,761 Topics

Member Avatar for
Member Avatar for SpyrosMet

Hello. I'm a newbie and i was wondering if anyone can tell me how to create an array that contains objects and number 0 wherever there is no object. Thanks in advance

Member Avatar for kvprajapati
0
118
Member Avatar for atticusr5

Hello everyone, I am a C++ newbie and I am running into some linking errors. I am using Vi to compile and link my code. Here are the linking errors: assign6.o: In function `cAccountList::cAccountList()': assign6.cpp:(.text+0x1db): undefined reference to `cAccount::cAccount()' assign6.o: In function `cAccountList::cAccountList()': assign6.cpp:(.text+0x22b): undefined reference to `cAccount::cAccount()' assign6.o: In …

Member Avatar for Ancient Dragon
0
109
Member Avatar for atticusr5

Hey everyone I am writing some code for my c++ class and in this program I am trying to sort back account information by there accountID #'s. When I try to compile, here are the errors I get: assign6.cpp: In member function ‘void cAccountList::sort_by_ID()’: assign6.cpp:110: error: ‘accountID’ was not declared …

Member Avatar for Narue
0
139
Member Avatar for sadhramani

[code] int do_openFile(void) { char *p ; /* pointer to outFileName */ char *m ; /* pointer to report date */ char *mon; /* month number in report date */ /* get output file name */ m = pk->CNCRptdate; m += 2; strncpy(mon, m, 2); p = outFileName ; strcpy(p, …

Member Avatar for Narue
0
153
Member Avatar for Szabi Zsoldos

I would like that case 1: should display how many elements do i want, and that i can assign values to those elements. Mine because of the j++ goes infinite, so i can enter infinite values to infinite arrays. How could i do this? Cate elemente vrei sa adaugi: 3 …

Member Avatar for Szabi Zsoldos
0
553
Member Avatar for noey699

Every thing works perfectly only it will not check for a full house. Ive tried to figure out what the problem was by rewriting pair checking and three of a kind checking but the same result always. The function simply returns an integer corresponding to the hand stength given a …

Member Avatar for noey699
0
148
Member Avatar for m_adeelkhan

i need help in making c++ code for tic tac toe on 7x7 board by using mini max and alpha beta where 4 in a row ,column,and diagonal are winning state , if some 1 can share code it will be quite help full 4 me

Member Avatar for WaltP
-1
156
Member Avatar for Zay

Hello; can we give the variable in struct an initial values ? ex: struct example{ int id; float gpa; string name; }; can we but this inside the structure : int id=34440; the same Q is for the Class ? can we intialize the variable when definr it for the …

Member Avatar for mrnutty
0
97
Member Avatar for falcon60

Hello. I'm new to C++ and I just learned how to use vectors and lists and indices and iterators, but i'm confused about iterators. Mainly, why should I use them instead of indices? They seem to add more complexity to accomplish the same thing as using indices... so could someone …

Member Avatar for Salem
0
71
Member Avatar for Dizzzy

Ok i have a char with ''/afile.html" assigned to it. The extensions of it can vary so i need to get the extension to a seperate char to compare it with something else il show you what i have.... Basically i need everything after the '.' [CODE]char resource[16]; n = …

Member Avatar for Dizzzy
0
137
Member Avatar for SpyrosMet

the error by the compiler is [code=text]Compiler: Default compiler Building Makefile: "C:\Dev-Cpp\Makefile.win" Executing make... make.exe -f "C:\Dev-Cpp\Makefile.win" all g++.exe Untitled1.o plants.o -o "Project1.exe" -L"C:/Dev-Cpp/lib" Untitled1.o(.text+0x182):Untitled1.cpp: undefined reference to `Plants::Plants()' collect2: ld returned 1 exit status make.exe: *** [Project1.exe] Error 1 Execution terminated[/code] main code is [code]#include <iostream> using std::cout; using …

Member Avatar for SgtMe
0
129
Member Avatar for C++ Beginner

Problem: Write a pgoramthat uses a structure to store the following information: Name, IdNum, Test1Score through Test4Score, average, and grade. function to ask the user for student's name, etc. The average score should be calculated and stored in the Average member of the structure should be calculated in their own …

Member Avatar for C++ Beginner
0
339
Member Avatar for Aiyen

Hello all, great forum that have been a great source of information for me over the past many weeks. So now I decided to join up. I am currently trying to write a partial sum function as part of a much larger program I once wrote in Fortran. I am …

Member Avatar for Aiyen
0
91
Member Avatar for SpyrosMet

Dev cpp gives me the error 18 C:\Dev-Cpp\Untitled1.cpp request for member `setStats' in `plant1', which is of non-class type `Plants ()()' And the same for line 19. Please someone tell me what's wrong. I'm a noob at c++. Thanks in advance. #include <iostream> using std::cout; using std::cin; using std::endl; #include …

Member Avatar for SpyrosMet
0
355
Member Avatar for mmasny

If we have three classes A,B,C declared as follows: [code=C++] class A{ protected: int x; }; class B : A{ //... }; class C : B{ //... }; [/code] does class C see its member x? It seems to me that it doesn't according to what the compiler says to …

Member Avatar for Fbody
0
124
Member Avatar for Chetan_

Hi! I'm making a graph generator. Most is done but the only problem is that when i'm doing the 2nd or 3rd graph in the same session, the graph collapses . and after the end of execution of the program, i get "Null pointer assignment" I tried debugging but i …

Member Avatar for mitrmkar
0
189
Member Avatar for smarty_t2

Can someone please tell me the difference between Class and Structure in C++ ??? I cant find any..!! Thanks

Member Avatar for jonsca
0
98
Member Avatar for isralruval

This code you are asked to input a number and it will tell u wheter or not the input you entered is in the array or not i am having issues with this code and its giving me some errors, if anyone wants to help me out it will be …

Member Avatar for jonsca
0
113
Member Avatar for Servet Yekta

Hello everyone, I'm trying to improve myself on Winsock , so I wrote a code which can get the content of an website.Now I'm trying to post (upload) a file to a http website.Here is my code , what should I add to my code to work with POST? Thanks …

Member Avatar for Servet Yekta
0
189
Member Avatar for fiaz ranjha

i have oop in c++ in some detail but i am not familair with java.please help me to write five sentences in prose or cons of this statement "c++ supports more oop features as compared to jave" please help me

Member Avatar for jonsca
0
82
Member Avatar for niknailer

[b]Split from - [url]http://www.daniweb.com/forums/thread255859.html[/url][/b] I think I may be in the same class as rwill357 and I am having some problems getting my code correct too. I appreciate the help that you have given so far. I have made the changes that you suggested. I'm not sure where I'm going …

Member Avatar for jonsca
0
93
Member Avatar for Christoph928

I need help with decrypting a 12 character message located in a file named encrypted.txt then printing the decrypted message to the screen and a new file named decrypted.txt. This is what i have so far... and don't understand how to print the char to the screen as a letter …

Member Avatar for Christoph928
0
145
Member Avatar for dude1

i have a numeric updown that goes from 0-99 and it works but i want to make it continuous so if i hit the down when its at 0 it goes to 99 and when its on 99 and i hit up it goes to zero anyone know the code …

Member Avatar for jonsca
0
154
Member Avatar for Web_Sailor

Hi gurus, I have a simple question regarding file parsing. I am trying to parse a file and store the fields I require in a multimap. Now I want to pass an array which is of int type and specifies field number to be extracted in a file. I am …

0
53
Member Avatar for isralruval

im having a difficult time figuring out my last two functions. first one which is the int divelement(int a[], int size); this function is suppose to find and print the elements of my array that are only divisible by 5, so the answer will be like 10,15,90, and 95. i …

Member Avatar for mrnutty
0
100
Member Avatar for stjohn999

this is my daughters homework she asked me to help and now im stuck she has worked it out and is making me look stupid need to get my selfrespect back even if i have to cheat(i used my brain and im asking you) the code is as follows but …

Member Avatar for WaltP
-1
79
Member Avatar for isralruval

ok, so i have a simple code below but i need an array function that calculates which elements are divisible by 5 and then its passes the results to the main function and outputs them, any help with code on how to do it will be appreciated? basically the above …

Member Avatar for WaltP
0
85
Member Avatar for hermann87

Greetings from Greece, this is my first post! I'm having some minor trouble with an application I've been working on the past week. So if you could please shed some light into this. Thank you. The problem I'm having is that when the user is trying to save a file …

Member Avatar for mitrmkar
1
483
Member Avatar for Skeen

So I've got this program I made, and I wanted to speed it up, using multithreading, to make use of my quad core. The program itself fully supports multithreading. The problem is, that when I'm running the program, using just one; CreateThread() it finishes in 6seconds, if I run 2 …

Member Avatar for ireshagun
0
104
Member Avatar for cin.fail

Hello everyone, I am quite new to C++ and I am currently trying to complete a project in creating a program that solves a maze of a given dimension.The text has to be read in and the first element of the file defines the size of the array,its an integer …

Member Avatar for jonsca
0
209

The End.