- Strength to Increase Rep
- +8
- Strength to Decrease Rep
- -2
- Upvotes Received
- 32
- Posts with Upvotes
- 26
- Upvoting Members
- 21
- Downvotes Received
- 5
- Posts with Downvotes
- 4
- Downvoting Members
- 5
Not an ArrayList. An Array. For some reason, my teacher (or rather, the lesson plan we are using) requires that we make a program that takes an array of integers and removes all the zeroes. So far I have: [CODE] public void remove(int index) { for(int i = index; i … |
|
hi all, i need to know how to create a thread using pthread_create()? i have never used pthread in c. am i supposed to used function pointer? how to pass arguments in thread function? i need to know everything about pthread_create(). and yes i am using turbo c++ compiler and … |
|
I really need help on my latest C++ assignment. The program was due a week ago and I'm still beating my head against a wall here. This is supposed to be a VERY SIMPLE linked list implementation. I have rewritten this dang thing countless times in as many different configurations … |
|
Hi I have some questions: I'm getting segmentation fault on print_clauses(...) function and I really can't figure it out why. But the bigger question is, am I doing something wrong in build_clauses(...) function? Am I using double pointers in right way? because the second #if ... #endif gives me N … |
|
[CODE]// student.cpp - Script 9.7 #include <iostream> #include <string> // Declare the Person class. class Person { public: Person(std::string theName); void introduce(); protected: std::string name; }; // Declare the Teacher class. // Teacher inherits Person. class Teacher: public Person { public: Teacher(std::string theClass); void teach(); void introduce(); protected: std::string clazz; … |
|
[CODE] #include<stdio.h> int main() { FILE *point; char others[35]; int indexer,count; strcpy(others,"Additional lines."); point = fopen("tenlines.txt","a"); /* open for appending */ for (count = 1;count <= 10;count++) { for (indexer = 0;others[indexer];indexer++) { putc(others[indexer],point); /* output a single character */ putc('\n',point); /* output a linefeed */ } } fclose(point); getchar(); … |
|
I've run into linking problems before, so I thought I had them figured out. This one I'm using every tool I have, but I can't seem to identify what the issue is. Did a build from the yaml site yesterday, I keep getting this linking error at runtime. I set … |
|
I need to write a program that sums all values in an array row that the user can choose. The program sums correctly but instead of only outputting one row's sum, it sums up all of the rows up until the input row and adds them all together. I can't … |
|
ok im kinda stuck in this homework, i dont know where to go next, please help me i need this done soon! heres the problem Your swim school has two swimming instructors, Jeff and Anna. Their current schedules are shown below. An "X" denotes a one-hour time slot that is … |
|
Hello Guys, I have implemented a linked list. And my output looks something like dis: ************************************************* The elements in the list : address is = 163196952 ADOC1100250100000119666 address is = 163196968 ADOC1100250100000119666 address is = 163196984 ADOC1100250100000119666 address is = 0 ADOC1100250100000119666 TOTAL NO OF ELEMENTS IN THE LIST ARE … |
|
[CODE]#include <iostream> #include <conio> using namespace std; int main() { int MyArray[ 3 ] = { 12, 23, 34 }; //Note 1 int* ptrMyArray = MyArray; //Note 2 int* ptrMyArray2 = &MyArray[ 0 ]; //Note 3 int* ptrMyArray3 = &MyArray[ 0 ]; //Note 4 for ( … |
|
hello to everyone i am new to this stuff so i was wondering if anyone could help me fix this error that i get on a code that is for a payroll assignment. when i build it i get this [B]C4551: function call missing argument list[/B]. would really like the … |
|
Hi everyone. This is my first post . I develop this program in C-Free 4.0 with <iostream> header... And it working [CODE] #include <iostream> #include <cstdlib> #include <iomanip> #include <ctime> using namespace std; int main () { int random_num; srand((unsigned)time(0)); bool assigned_players[32]; for (int i=0;i<32;i++) assigned_players[i] = false; int n=32; … |
|
Hey, i was reading up on find function and i came across this line. size_t find ( const char* s, size_t pos, size_t n ) const; Correct me if im wrong, but it basically allows us to search a string based on the information inside an array right? After searching … |
|
Hey guys, i am having a huge problem checking the data i input to make sure it is correct. What i am trying to achieve is when i input a value, it will check if the input is all digits and if it is not, check to see if it … |
|
i was putting the finishing touches on my project and there are some errors that came up here is my code: [CODE] else if (action == 3){ system("cls"); cout << "Russia has an entrenched, albeit underfunded, system of socialized medicine. Basic medical care is available" << endl; cout << "to … |
|
I have one error in my code Error 1 fatal error C1075: end of file found before the left brace '{' at line 50 The program is suppose to ask the user for a filename, read and display the file. Then show 24 lines per screen. I thought I checked … |
|
so this is the part of my code that has an error: [CODE]int Mainmenu(){ system("cls"); int action; char action1; cout << "Welcome to my Quarter Project." << endl; cout << "What would you like to learn more about?" << endl; cout << "1. Medecine in the United States." << endl; … |
|
Hey guys. I'm having some issues with my Visual Studio 2008 Pro. I'm trying to compile the following code, included in the link [url]http://pastebin.com/r6WsG5r7;[/url] but, whenever I try compiling the code, I get like 5 erros: The errors are listed below. Why is it that moving certain declarations around changes … |
|
Is it possible to delete a non dynamic variable? Or is it automatically deleted when I construct a new one with the same name? [CODE] int N; int N; [/CODE] Is this possible? My purpose is, that I want to use an object from a class in a loop: [CODE] … |
|
number of iterations in the following loop [CODE]main() { int x=5, y=10, z=9 for (;x<=5;) {y++;z--; x=x+1/2; if(z==0) z=y;}}[/CODE] |
|
i'm having a problem in executing a batch file from my c++ code i've included all the necesary headers like dos.h,process.h,stdlib.h code: system(c:\new\ram.bat); there is no error in the program but the batch file does not get executed..... please help ................ |
|
can we declare a array as, int arre[x]; and assign the value of x as,x=5; but error is coming "constant expression required." Any help? i wanted to input series of marks,first you should enter how many subjects(if 5 subs,x=5) then you can enter 5 marks. |
|
hi every one I really need help with this and how to do it =The motel has 12 rooms numbered 1 to 12, and each handles a maximum of 4 guests. Assume all rooms begin empty. Provide a user-friendly interactive menu that allows the following transactions: B – Book room(s) … |
|
The following is an excerpt from a complete program that runs without any errors. It has 2 file dependencies which it uses to access and store information. The program, in its entirety, displays a menu with 5 options the user can choose from. [LIST=1] [*]View Characters [*]View Items [*]Add Character … |
|
Hey guys, I want to know how can we write the usernames and passwords in file just one time and later on they can be used for log in purpose.. I've some 5 objects of 1 class which can call the class only when the Username and password is correct. … |
|
for many times when i debuge defferent programs i found this error. I think no error in my code because when i degun the same program in ma freids computer no wrong happen. Any idea. the errors: 1- fatal error LNK1120: 1 unresolved external. 2- error LNK2019: unresolved external symbol … |
|
Can someone please tell me what im doing wrong in this program..im gettin a compiler error saying: C:\Dev-Cpp\projects\proto.cpp In function `int main(int, char**)': 46 C:\Dev-Cpp\projects\proto.cpp a function-definition is not allowed here before '{' token 46 C:\Dev-Cpp\projects\proto.cpp expected `,' or `;' before '{' token C:\Dev-Cpp\projects\Makefile.win [Build Error] [proto.o] Error 1 The … |
|
Hi, i have this letters, A,R,V,G,M,N,B. And from those i need to get 4 of them randomly, bit i dont know how to do it, please help! :D |
|
I need to write a program that asks for the input of variables and one variable must be entered as "?", but I cannot get the program to use "?" at all. Also, I don't know how to create a driver function. Once I get the "?" input working, will … |